home *** CD-ROM | disk | FTP | other *** search
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
browse contents |
view JSON data
|
view as text
This file was processed as: PKZip Archive
(archive/zip ).
Confidence Program Detection Match Type Support
100%
dexvert
PKZip Archive (archive/zip)
magic
Supported
100%
file
Zip archive data, at least v1.0 to extract, compression method=store
default
99%
file
Zip archive data, made by v2.3 MVS, extract using at least v1.0, last modified, last modified Sun, Dec 05 2000 13:01:02, uncompressed size 59448, method=store
default
98%
file
Zip archive, with extra data prepended
default
97%
file
data
default
58%
TrID
Mozilla Archive Format (gen)
default (weak)
33%
TrID
ZIP compressed archive
default
8%
TrID
PrintFox/Pagefox bitmap (640x800)
default (weak)
100%
lsar
Zip
default
100%
gt2
ZIP Archiv gefunden (Auflistung ist deaktiviert)
default
100%
binwalkID
Zip archive data, at least v1.0 to extract, compressed size: 59448, uncompressed size: 59448, name: srvmain.pas
default
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 50 4b 03 04 0a 00 00 00 | 00 00 21 68 85 29 10 93 |PK......|..!h.)..| |00000010| d3 36 38 e8 00 00 38 e8 | 00 00 0b 00 63 00 73 72 |.68...8.|....c.sr| |00000020| 76 6d 61 69 6e 2e 70 61 | 73 53 44 4e 00 5c 00 00 |vmain.pa|sSDN.\..| |00000030| 00 00 08 00 ee 6c c8 09 | 63 64 60 69 10 61 60 60 |.....l..|cd`i.a``| |00000040| 50 01 62 10 70 00 62 46 | 26 10 8b 81 55 01 48 28 |P.b.p.bF|&...U.H(| |00000050| 00 d9 8c ac 20 2e 03 ab | 28 90 d0 73 5e e3 90 53 |.... ...|(..s^..S| |00000060| d9 90 d9 d4 bd 4c 03 a4 | 8e 89 41 86 81 11 2c 2d |.....L..|..A...,-| |00000070| c2 f0 9f 51 9e 81 11 c2 | 01 93 00 55 54 0d 00 07 |...Q....|...UT...| |00000080| 2e 03 2d 3a 83 03 2d 3a | 17 03 2d 3a 2f 2f 2f 2f |..-:..-:|..-:////| |00000090| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////| |000000a0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////| |000000b0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////| |000000c0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////| |000000d0| 2f 2f 2f 2f 2f 2f 0d 0a | 2f 2f 0d 0a 2f 2f 20 20 |//////..|//..// | |000000e0| 54 69 6e 79 57 65 62 20 | 43 6f 70 79 72 69 67 68 |TinyWeb |Copyrigh| |000000f0| 74 20 28 43 29 20 32 30 | 30 30 20 52 49 54 4c 41 |t (C) 20|00 RITLA| |00000100| 42 53 20 53 2e 52 2e 4c | 2e 0d 0a 2f 2f 0d 0a 2f |BS S.R.L|...//../| |00000110| 2f 20 20 54 68 69 73 20 | 70 72 6f 67 72 61 6d 73 |/ This |programs| |00000120| 20 69 73 20 66 72 65 65 | 20 66 6f 72 20 63 6f 6d | is free| for com| |00000130| 6d 65 72 63 69 61 6c 20 | 61 6e 64 20 6e 6f 6e 2d |mercial |and non-| |00000140| 63 6f 6d 6d 65 72 63 69 | 61 6c 20 75 73 65 20 61 |commerci|al use a| |00000150| 73 20 6c 6f 6e 67 20 61 | 73 0d 0a 2f 2f 20 20 74 |s long a|s..// t| |00000160| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 63 6f 6e |he follo|wing con| |00000170| 64 69 74 69 6f 6e 73 20 | 61 72 65 20 61 68 65 61 |ditions |are ahea| |00000180| 72 65 64 20 74 6f 2e 0d | 0a 2f 2f 0d 0a 2f 2f 20 |red to..|.//..// | |00000190| 20 43 6f 70 79 72 69 67 | 68 74 20 72 65 6d 61 69 | Copyrig|ht remai| |000001a0| 6e 73 20 52 49 54 4c 41 | 42 53 20 53 2e 52 2e 4c |ns RITLA|BS S.R.L| |000001b0| 2e 2c 20 61 6e 64 20 61 | 73 20 73 75 63 68 20 61 |., and a|s such a| |000001c0| 6e 79 20 43 6f 70 79 72 | 69 67 68 74 20 6e 6f 74 |ny Copyr|ight not| |000001d0| 69 63 65 73 0d 0a 2f 2f | 20 20 69 6e 20 74 68 65 |ices..//| in the| |000001e0| 20 63 6f 64 65 20 61 72 | 65 20 6e 6f 74 20 74 6f | code ar|e not to| |000001f0| 20 62 65 20 72 65 6d 6f | 76 65 64 2e 20 49 66 20 | be remo|ved. If | |00000200| 74 68 69 73 20 70 61 63 | 6b 61 67 65 20 69 73 20 |this pac|kage is | |00000210| 75 73 65 64 20 69 6e 20 | 61 0d 0a 2f 2f 20 20 70 |used in |a..// p| |00000220| 72 6f 64 75 63 74 2c 20 | 52 49 54 4c 41 42 53 20 |roduct, |RITLABS | |00000230| 53 2e 52 2e 4c 2e 20 73 | 68 6f 75 6c 64 20 62 65 |S.R.L. s|hould be| |00000240| 20 67 69 76 65 6e 20 61 | 74 74 72 69 62 75 74 69 | given a|ttributi| |00000250| 6f 6e 20 61 73 20 74 68 | 65 20 6f 77 6e 65 72 0d |on as th|e owner.| |00000260| 0a 2f 2f 20 20 6f 66 20 | 74 68 65 20 70 61 72 74 |.// of |the part| |00000270| 73 20 6f 66 20 74 68 65 | 20 6c 69 62 72 61 72 79 |s of the| library| |00000280| 20 75 73 65 64 2e 20 54 | 68 69 73 20 63 61 6e 20 | used. T|his can | |00000290| 62 65 20 69 6e 20 74 68 | 65 20 66 6f 72 6d 20 6f |be in th|e form o| |000002a0| 66 20 61 20 74 65 78 74 | 75 61 6c 0d 0a 2f 2f 20 |f a text|ual..// | |000002b0| 20 6d 65 73 73 61 67 65 | 20 61 74 20 70 72 6f 67 | message| at prog| |000002c0| 72 61 6d 20 73 74 61 72 | 74 75 70 20 6f 72 20 69 |ram star|tup or i| |000002d0| 6e 20 64 6f 63 75 6d 65 | 6e 74 61 74 69 6f 6e 20 |n docume|ntation | |000002e0| 28 6f 6e 6c 69 6e 65 20 | 6f 72 20 74 65 78 74 75 |(online |or textu| |000002f0| 61 6c 29 0d 0a 2f 2f 20 | 20 70 72 6f 76 69 64 65 |al)..// | provide| |00000300| 64 20 77 69 74 68 20 74 | 68 65 20 70 61 63 6b 61 |d with t|he packa| |00000310| 67 65 2e 0d 0a 2f 2f 0d | 0a 2f 2f 20 20 52 65 64 |ge...//.|.// Red| |00000320| 69 73 74 72 69 62 75 74 | 69 6f 6e 20 61 6e 64 20 |istribut|ion and | |00000330| 75 73 65 20 69 6e 20 73 | 6f 75 72 63 65 20 61 6e |use in s|ource an| |00000340| 64 20 62 69 6e 61 72 79 | 20 66 6f 72 6d 73 2c 20 |d binary| forms, | |00000350| 77 69 74 68 20 6f 72 20 | 77 69 74 68 6f 75 74 0d |with or |without.| |00000360| 0a 2f 2f 20 20 6d 6f 64 | 69 66 69 63 61 74 69 6f |.// mod|ificatio| |00000370| 6e 2c 20 61 72 65 20 70 | 65 72 6d 69 74 74 65 64 |n, are p|ermitted| |00000380| 20 70 72 6f 76 69 64 65 | 64 20 74 68 61 74 20 74 | provide|d that t| |00000390| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 63 6f 6e |he follo|wing con| |000003a0| 64 69 74 69 6f 6e 73 20 | 61 72 65 0d 0a 2f 2f 20 |ditions |are..// | |000003b0| 20 6d 65 74 3a 0d 0a 2f | 2f 0d 0a 2f 2f 20 20 31 | met:../|/..// 1| |000003c0| 2e 20 52 65 64 69 73 74 | 72 69 62 75 74 69 6f 6e |. Redist|ribution| |000003d0| 73 20 6f 66 20 73 6f 75 | 72 63 65 20 63 6f 64 65 |s of sou|rce code| |000003e0| 20 6d 75 73 74 20 72 65 | 74 61 69 6e 20 74 68 65 | must re|tain the| |000003f0| 20 63 6f 70 79 72 69 67 | 68 74 0d 0a 2f 2f 20 20 | copyrig|ht..// | |00000400| 20 20 20 6e 6f 74 69 63 | 65 2c 20 74 68 69 73 20 | notic|e, this | |00000410| 6c 69 73 74 20 6f 66 20 | 63 6f 6e 64 69 74 69 6f |list of |conditio| |00000420| 6e 73 20 61 6e 64 20 74 | 68 65 20 66 6f 6c 6c 6f |ns and t|he follo| |00000430| 77 69 6e 67 20 64 69 73 | 63 6c 61 69 6d 65 72 2e |wing dis|claimer.| |00000440| 0d 0a 2f 2f 20 20 32 2e | 20 52 65 64 69 73 74 72 |..// 2.| Redistr| |00000450| 69 62 75 74 69 6f 6e 73 | 20 69 6e 20 62 69 6e 61 |ibutions| in bina| |00000460| 72 79 20 66 6f 72 6d 20 | 6d 75 73 74 20 72 65 70 |ry form |must rep| |00000470| 72 6f 64 75 63 65 20 74 | 68 65 20 61 62 6f 76 65 |roduce t|he above| |00000480| 20 63 6f 70 79 72 69 67 | 68 74 0d 0a 2f 2f 20 20 | copyrig|ht..// | |00000490| 20 20 20 6e 6f 74 69 63 | 65 2c 20 74 68 69 73 20 | notic|e, this | |000004a0| 6c 69 73 74 20 6f 66 20 | 63 6f 6e 64 69 74 69 6f |list of |conditio| |000004b0| 6e 73 20 61 6e 64 20 74 | 68 65 20 66 6f 6c 6c 6f |ns and t|he follo| |000004c0| 77 69 6e 67 20 64 69 73 | 63 6c 61 69 6d 65 72 20 |wing dis|claimer | |000004d0| 69 6e 20 74 68 65 0d 0a | 2f 2f 20 20 20 20 20 64 |in the..|// d| |000004e0| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 61 6e 64 |ocumenta|tion and| |000004f0| 2f 6f 72 20 6f 74 68 65 | 72 20 6d 61 74 65 72 69 |/or othe|r materi| |00000500| 61 6c 73 20 70 72 6f 76 | 69 64 65 64 20 77 69 74 |als prov|ided wit| |00000510| 68 20 74 68 65 20 64 69 | 73 74 72 69 62 75 74 69 |h the di|stributi| |00000520| 6f 6e 2e 0d 0a 2f 2f 20 | 20 33 2e 20 41 6c 6c 20 |on...// | 3. All | |00000530| 61 64 76 65 72 74 69 73 | 69 6e 67 20 6d 61 74 65 |advertis|ing mate| |00000540| 72 69 61 6c 73 20 6d 65 | 6e 74 69 6f 6e 69 6e 67 |rials me|ntioning| |00000550| 20 66 65 61 74 75 72 65 | 73 20 6f 72 20 75 73 65 | feature|s or use| |00000560| 20 6f 66 20 74 68 69 73 | 20 73 6f 66 74 77 61 72 | of this| softwar| |00000570| 65 0d 0a 2f 2f 20 20 20 | 20 20 6d 75 73 74 20 64 |e..// | must d| |00000580| 69 73 70 6c 61 79 20 74 | 68 65 20 66 6f 6c 6c 6f |isplay t|he follo| |00000590| 77 69 6e 67 20 61 63 6b | 6e 6f 77 6c 65 64 67 65 |wing ack|nowledge| |000005a0| 6d 65 6e 74 3a 0d 0a 2f | 2f 20 20 20 20 20 22 42 |ment:../|/ "B| |000005b0| 61 73 65 64 20 6f 6e 20 | 54 69 6e 79 57 65 62 20 |ased on |TinyWeb | |000005c0| 53 65 72 76 65 72 20 62 | 79 20 52 49 54 4c 41 42 |Server b|y RITLAB| |000005d0| 53 20 53 2e 52 2e 4c 2e | 2e 22 0d 0a 2f 2f 0d 0a |S S.R.L.|."..//..| |000005e0| 2f 2f 20 20 54 48 49 53 | 20 53 4f 46 54 57 41 52 |// THIS| SOFTWAR| |000005f0| 45 20 49 53 20 50 52 4f | 56 49 44 45 44 20 42 59 |E IS PRO|VIDED BY| |00000600| 20 52 49 54 4c 41 42 53 | 20 53 2e 52 2e 4c 2e 20 | RITLABS| S.R.L. | |00000610| 22 41 53 20 49 53 22 20 | 41 4e 44 20 41 4e 59 20 |"AS IS" |AND ANY | |00000620| 45 58 50 52 45 53 53 0d | 0a 2f 2f 20 20 4f 52 20 |EXPRESS.|.// OR | |00000630| 49 4d 50 4c 49 45 44 20 | 57 41 52 52 41 4e 54 49 |IMPLIED |WARRANTI| |00000640| 45 53 2c 20 49 4e 43 4c | 55 44 49 4e 47 2c 20 42 |ES, INCL|UDING, B| |00000650| 55 54 20 4e 4f 54 20 4c | 49 4d 49 54 45 44 20 54 |UT NOT L|IMITED T| |00000660| 4f 2c 20 54 48 45 20 49 | 4d 50 4c 49 45 44 0d 0a |O, THE I|MPLIED..| |00000670| 2f 2f 20 20 57 41 52 52 | 41 4e 54 49 45 53 20 4f |// WARR|ANTIES O| |00000680| 46 20 4d 45 52 43 48 41 | 4e 54 41 42 49 4c 49 54 |F MERCHA|NTABILIT| |00000690| 59 20 41 4e 44 20 46 49 | 54 4e 45 53 53 20 46 4f |Y AND FI|TNESS FO| |000006a0| 52 20 41 20 50 41 52 54 | 49 43 55 4c 41 52 20 50 |R A PART|ICULAR P| |000006b0| 55 52 50 4f 53 45 20 41 | 52 45 0d 0a 2f 2f 20 20 |URPOSE A|RE..// | |000006c0| 44 49 53 43 4c 41 49 4d | 45 44 2e 20 49 4e 20 4e |DISCLAIM|ED. IN N| |000006d0| 4f 20 45 56 45 4e 54 20 | 53 48 41 4c 4c 20 54 48 |O EVENT |SHALL TH| |000006e0| 45 20 41 55 54 48 4f 52 | 20 4f 52 20 43 4f 4e 54 |E AUTHOR| OR CONT| |000006f0| 52 49 42 55 54 4f 52 53 | 20 42 45 20 4c 49 41 42 |RIBUTORS| BE LIAB| |00000700| 4c 45 20 46 4f 52 0d 0a | 2f 2f 20 20 41 4e 59 20 |LE FOR..|// ANY | |00000710| 44 49 52 45 43 54 2c 20 | 49 4e 44 49 52 45 43 54 |DIRECT, |INDIRECT| |00000720| 2c 20 49 4e 43 49 44 45 | 4e 54 41 4c 2c 20 53 50 |, INCIDE|NTAL, SP| |00000730| 45 43 49 41 4c 2c 20 45 | 58 45 4d 50 4c 41 52 59 |ECIAL, E|XEMPLARY| |00000740| 2c 20 4f 52 20 43 4f 4e | 53 45 51 55 45 4e 54 49 |, OR CON|SEQUENTI| |00000750| 41 4c 0d 0a 2f 2f 20 20 | 44 41 4d 41 47 45 53 20 |AL..// |DAMAGES | |00000760| 28 49 4e 43 4c 55 44 49 | 4e 47 2c 20 42 55 54 20 |(INCLUDI|NG, BUT | |00000770| 4e 4f 54 20 4c 49 4d 49 | 54 45 44 20 54 4f 2c 20 |NOT LIMI|TED TO, | |00000780| 50 52 4f 43 55 52 45 4d | 45 4e 54 20 4f 46 20 53 |PROCUREM|ENT OF S| |00000790| 55 42 53 54 49 54 55 54 | 45 0d 0a 2f 2f 20 20 47 |UBSTITUT|E..// G| |000007a0| 4f 4f 44 53 20 4f 52 20 | 53 45 52 56 49 43 45 53 |OODS OR |SERVICES| |000007b0| 3b 20 4c 4f 53 53 20 4f | 46 20 55 53 45 2c 20 44 |; LOSS O|F USE, D| |000007c0| 41 54 41 2c 20 4f 52 20 | 50 52 4f 46 49 54 53 3b |ATA, OR |PROFITS;| |000007d0| 20 4f 52 20 42 55 53 49 | 4e 45 53 53 0d 0a 2f 2f | OR BUSI|NESS..//| |000007e0| 20 20 49 4e 54 45 52 52 | 55 50 54 49 4f 4e 29 20 | INTERR|UPTION) | |000007f0| 48 4f 57 45 56 45 52 20 | 43 41 55 53 45 44 20 41 |HOWEVER |CAUSED A| |00000800| 4e 44 20 4f 4e 20 41 4e | 59 20 54 48 45 4f 52 59 |ND ON AN|Y THEORY| |00000810| 20 4f 46 20 4c 49 41 42 | 49 4c 49 54 59 2c 20 57 | OF LIAB|ILITY, W| |00000820| 48 45 54 48 45 52 0d 0a | 2f 2f 20 20 49 4e 20 43 |HETHER..|// IN C| |00000830| 4f 4e 54 52 41 43 54 2c | 20 53 54 52 49 43 54 20 |ONTRACT,| STRICT | |00000840| 4c 49 41 42 49 4c 49 54 | 59 2c 20 4f 52 20 54 4f |LIABILIT|Y, OR TO| |00000850| 52 54 20 28 49 4e 43 4c | 55 44 49 4e 47 20 4e 45 |RT (INCL|UDING NE| |00000860| 47 4c 49 47 45 4e 43 45 | 20 4f 52 0d 0a 2f 2f 20 |GLIGENCE| OR..// | |00000870| 20 4f 54 48 45 52 57 49 | 53 45 29 20 41 52 49 53 | OTHERWI|SE) ARIS| |00000880| 49 4e 47 20 49 4e 20 41 | 4e 59 20 57 41 59 20 4f |ING IN A|NY WAY O| |00000890| 55 54 20 4f 46 20 54 48 | 45 20 55 53 45 20 4f 46 |UT OF TH|E USE OF| |000008a0| 20 54 48 49 53 20 53 4f | 46 54 57 41 52 45 2c 20 | THIS SO|FTWARE, | |000008b0| 45 56 45 4e 20 49 46 0d | 0a 2f 2f 20 20 41 44 56 |EVEN IF.|.// ADV| |000008c0| 49 53 45 44 20 4f 46 20 | 54 48 45 20 50 4f 53 53 |ISED OF |THE POSS| |000008d0| 49 42 49 4c 49 54 59 20 | 4f 46 20 53 55 43 48 20 |IBILITY |OF SUCH | |000008e0| 44 41 4d 41 47 45 2e 0d | 0a 2f 2f 0d 0a 2f 2f 20 |DAMAGE..|.//..// | |000008f0| 20 54 68 65 20 6c 69 63 | 65 6e 63 65 20 61 6e 64 | The lic|ence and| |00000900| 20 64 69 73 74 72 69 62 | 75 74 69 6f 6e 20 74 65 | distrib|ution te| |00000910| 72 6d 73 20 66 6f 72 20 | 61 6e 79 20 70 75 62 6c |rms for |any publ| |00000920| 69 63 61 6c 6c 79 20 61 | 76 61 69 6c 61 62 6c 65 |ically a|vailable| |00000930| 0d 0a 2f 2f 20 20 76 65 | 72 73 69 6f 6e 20 6f 72 |..// ve|rsion or| |00000940| 20 64 65 72 69 76 61 74 | 69 76 65 20 6f 66 20 74 | derivat|ive of t| |00000950| 68 69 73 20 63 6f 64 65 | 20 63 61 6e 6e 6f 74 20 |his code| cannot | |00000960| 62 65 20 63 68 61 6e 67 | 65 64 2e 20 69 2e 65 2e |be chang|ed. i.e.| |00000970| 20 74 68 69 73 20 63 6f | 64 65 0d 0a 2f 2f 20 20 | this co|de..// | |00000980| 63 61 6e 6e 6f 74 20 73 | 69 6d 70 6c 79 20 62 65 |cannot s|imply be| |00000990| 20 63 6f 70 69 65 64 20 | 61 6e 64 20 70 75 74 20 | copied |and put | |000009a0| 75 6e 64 65 72 20 61 6e | 6f 74 68 65 72 20 64 69 |under an|other di| |000009b0| 73 74 72 69 62 75 74 69 | 6f 6e 20 6c 69 63 65 6e |stributi|on licen| |000009c0| 63 65 0d 0a 2f 2f 20 20 | 28 69 6e 63 6c 75 64 69 |ce..// |(includi| |000009d0| 6e 67 20 74 68 65 20 47 | 4e 55 20 50 75 62 6c 69 |ng the G|NU Publi| |000009e0| 63 20 4c 69 63 65 6e 63 | 65 29 2e 0d 0a 2f 2f 0d |c Licenc|e)...//.| |000009f0| 0a 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |.///////|////////| |00000a00| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////| |00000a10| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////| |00000a20| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////| |00000a30| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 0d 0a 0d 0a 0d |////////|///.....| |00000a40| 0a 75 6e 69 74 20 53 72 | 76 4d 61 69 6e 3b 0d 0a |.unit Sr|vMain;..| |00000a50| 0d 0a 69 6e 74 65 72 66 | 61 63 65 0d 0a 0d 0a 70 |..interf|ace....p| |00000a60| 72 6f 63 65 64 75 72 65 | 20 43 6f 6d 65 4f 6e 3b |rocedure| ComeOn;| |00000a70| 0d 0a 0d 0a 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |....impl|ementati| |00000a80| 6f 6e 0d 0a 0d 0a 75 73 | 65 73 0d 0a 20 20 57 69 |on....us|es.. Wi| |00000a90| 6e 53 6f 63 6b 2c 0d 0a | 20 20 57 69 6e 64 6f 77 |nSock,..| Window| |00000aa0| 73 2c 0d 0a 20 20 78 42 | 61 73 65 3b 0d 0a 0d 0a |s,.. xB|ase;....| |00000ab0| 63 6f 6e 73 74 0d 0a 0d | 0a 20 20 53 63 72 69 70 |const...|. Scrip| |00000ac0| 74 73 50 61 74 68 20 3d | 20 27 63 67 69 2d 62 69 |tsPath =| 'cgi-bi| |00000ad0| 6e 27 3b 0d 0a 0d 0a 20 | 20 43 48 54 54 50 53 65 |n';.... | CHTTPSe| |00000ae0| 72 76 65 72 54 68 72 65 | 61 64 42 75 66 53 69 7a |rverThre|adBufSiz| |00000af0| 65 20 3d 20 24 32 30 30 | 30 3b 0d 0a 20 20 4d 61 |e = $200|0;.. Ma| |00000b00| 78 53 74 61 74 75 73 43 | 6f 64 65 49 64 78 20 3d |xStatusC|odeIdx =| |00000b10| 20 33 36 3b 0d 0a 20 20 | 53 74 61 74 75 73 43 6f | 36;.. |StatusCo| |00000b20| 64 65 73 20 3a 20 61 72 | 72 61 79 5b 30 2e 2e 4d |des : ar|ray[0..M| |00000b30| 61 78 53 74 61 74 75 73 | 43 6f 64 65 49 64 78 5d |axStatus|CodeIdx]| |00000b40| 20 6f 66 20 72 65 63 6f | 72 64 20 43 6f 64 65 3a | of reco|rd Code:| |00000b50| 20 49 6e 74 65 67 65 72 | 3b 20 4d 73 67 3a 20 73 | Integer|; Msg: s| |00000b60| 74 72 69 6e 67 20 65 6e | 64 20 3d 0d 0a 20 20 28 |tring en|d =.. (| |00000b70| 28 43 6f 64 65 3a 31 30 | 30 3b 20 4d 73 67 3a 27 |(Code:10|0; Msg:'| |00000b80| 43 6f 6e 74 69 6e 75 65 | 27 29 2c 0d 0a 20 20 20 |Continue|'),.. | |00000b90| 28 43 6f 64 65 3a 31 30 | 31 3b 20 4d 73 67 3a 27 |(Code:10|1; Msg:'| |00000ba0| 53 77 69 74 63 68 69 6e | 67 20 50 72 6f 74 6f 63 |Switchin|g Protoc| |00000bb0| 6f 6c 73 27 29 2c 0d 0a | 20 20 20 28 43 6f 64 65 |ols'),..| (Code| |00000bc0| 3a 32 30 30 3b 20 4d 73 | 67 3a 27 4f 4b 27 29 2c |:200; Ms|g:'OK'),| |00000bd0| 0d 0a 20 20 20 28 43 6f | 64 65 3a 32 30 31 3b 20 |.. (Co|de:201; | |00000be0| 4d 73 67 3a 27 43 72 65 | 61 74 65 64 27 29 2c 0d |Msg:'Cre|ated'),.| |00000bf0| 0a 20 20 20 28 43 6f 64 | 65 3a 32 30 32 3b 20 4d |. (Cod|e:202; M| |00000c00| 73 67 3a 27 41 63 63 65 | 70 74 65 64 27 29 2c 0d |sg:'Acce|pted'),.| |00000c10| 0a 20 20 20 28 43 6f 64 | 65 3a 32 30 33 3b 20 4d |. (Cod|e:203; M| |00000c20| 73 67 3a 27 4e 6f 6e 2d | 41 75 74 68 6f 72 69 74 |sg:'Non-|Authorit| |00000c30| 61 74 69 76 65 20 49 6e | 66 6f 72 6d 61 74 69 6f |ative In|formatio| |00000c40| 6e 27 29 2c 0d 0a 20 20 | 20 28 43 6f 64 65 3a 32 |n'),.. | (Code:2| |00000c50| 30 34 3b 20 4d 73 67 3a | 27 4e 6f 20 43 6f 6e 74 |04; Msg:|'No Cont| |00000c60| 65 6e 74 27 29 2c 0d 0a | 20 20 20 28 43 6f 64 65 |ent'),..| (Code| |00000c70| 3a 32 30 35 3b 20 4d 73 | 67 3a 27 52 65 73 65 74 |:205; Ms|g:'Reset| |00000c80| 20 43 6f 6e 74 65 6e 74 | 27 29 2c 0d 0a 20 20 20 | Content|'),.. | |00000c90| 28 43 6f 64 65 3a 32 30 | 36 3b 20 4d 73 67 3a 27 |(Code:20|6; Msg:'| |00000ca0| 50 61 72 74 69 61 6c 20 | 43 6f 6e 74 65 6e 74 27 |Partial |Content'| |00000cb0| 29 2c 0d 0a 20 20 20 28 | 43 6f 64 65 3a 33 30 30 |),.. (|Code:300| |00000cc0| 3b 20 4d 73 67 3a 27 4d | 75 6c 74 69 70 6c 65 20 |; Msg:'M|ultiple | |00000cd0| 43 68 6f 69 63 65 73 27 | 29 2c 0d 0a 20 20 20 28 |Choices'|),.. (| |00000ce0| 43 6f 64 65 3a 33 30 31 | 3b 20 4d 73 67 3a 27 4d |Code:301|; Msg:'M| |00000cf0| 6f 76 65 64 20 50 65 72 | 6d 61 6e 65 6e 74 6c 79 |oved Per|manently| |00000d00| 27 29 2c 0d 0a 20 20 20 | 28 43 6f 64 65 3a 33 30 |'),.. |(Code:30| |00000d10| 32 3b 20 4d 73 67 3a 27 | 4d 6f 76 65 64 20 54 65 |2; Msg:'|Moved Te| |00000d20| 6d 70 6f 72 61 72 69 6c | 79 27 29 2c 0d 0a 20 20 |mporaril|y'),.. | |00000d30| 20 28 43 6f 64 65 3a 33 | 30 33 3b 20 4d 73 67 3a | (Code:3|03; Msg:| |00000d40| 27 53 65 65 20 4f 74 68 | 65 72 27 29 2c 0d 0a 20 |'See Oth|er'),.. | |00000d50| 20 20 28 43 6f 64 65 3a | 33 30 34 3b 20 4d 73 67 | (Code:|304; Msg| |00000d60| 3a 27 4e 6f 74 20 4d 6f | 64 69 66 69 65 64 27 29 |:'Not Mo|dified')| |00000d70| 2c 0d 0a 20 20 20 28 43 | 6f 64 65 3a 33 30 35 3b |,.. (C|ode:305;| |00000d80| 20 4d 73 67 3a 27 55 73 | 65 20 50 72 6f 78 79 27 | Msg:'Us|e Proxy'| |00000d90| 29 2c 0d 0a 20 20 20 28 | 43 6f 64 65 3a 34 30 30 |),.. (|Code:400| |00000da0| 3b 20 4d 73 67 3a 27 42 | 61 64 20 52 65 71 75 65 |; Msg:'B|ad Reque| |00000db0| 73 74 27 29 2c 0d 0a 20 | 20 20 28 43 6f 64 65 3a |st'),.. | (Code:| |00000dc0| 34 30 31 3b 20 4d 73 67 | 3a 27 55 6e 61 75 74 68 |401; Msg|:'Unauth| |00000dd0| 6f 72 69 7a 65 64 27 29 | 2c 0d 0a 20 20 20 28 43 |orized')|,.. (C| |00000de0| 6f 64 65 3a 34 30 32 3b | 20 4d 73 67 3a 27 50 61 |ode:402;| Msg:'Pa| |00000df0| 79 6d 65 6e 74 20 52 65 | 71 75 69 72 65 64 27 29 |yment Re|quired')| |00000e00| 2c 0d 0a 20 20 20 28 43 | 6f 64 65 3a 34 30 33 3b |,.. (C|ode:403;| |00000e10| 20 4d 73 67 3a 27 46 6f | 72 62 69 64 64 65 6e 27 | Msg:'Fo|rbidden'| |00000e20| 29 2c 0d 0a 20 20 20 28 | 43 6f 64 65 3a 34 30 34 |),.. (|Code:404| |00000e30| 3b 20 4d 73 67 3a 27 4e | 6f 74 20 46 6f 75 6e 64 |; Msg:'N|ot Found| |00000e40| 27 29 2c 0d 0a 20 20 20 | 28 43 6f 64 65 3a 34 30 |'),.. |(Code:40| |00000e50| 35 3b 20 4d 73 67 3a 27 | 4d 65 74 68 6f 64 20 4e |5; Msg:'|Method N| |00000e60| 6f 74 20 41 6c 6c 6f 77 | 65 64 27 29 2c 0d 0a 20 |ot Allow|ed'),.. | |00000e70| 20 20 28 43 6f 64 65 3a | 34 30 36 3b 20 4d 73 67 | (Code:|406; Msg| |00000e80| 3a 27 4e 6f 74 20 41 63 | 63 65 70 74 61 62 6c 65 |:'Not Ac|ceptable| |00000e90| 27 29 2c 0d 0a 20 20 20 | 28 43 6f 64 65 3a 34 30 |'),.. |(Code:40| |00000ea0| 37 3b 20 4d 73 67 3a 27 | 50 72 6f 78 79 20 41 75 |7; Msg:'|Proxy Au| |00000eb0| 74 68 65 6e 74 69 63 61 | 74 69 6f 6e 20 52 65 71 |thentica|tion Req| |00000ec0| 75 69 72 65 64 27 29 2c | 0d 0a 20 20 20 28 43 6f |uired'),|.. (Co| |00000ed0| 64 65 3a 34 30 38 3b 20 | 4d 73 67 3a 27 52 65 71 |de:408; |Msg:'Req| |00000ee0| 75 65 73 74 20 54 69 6d | 65 2d 6f 75 74 27 29 2c |uest Tim|e-out'),| |00000ef0| 0d 0a 20 20 20 28 43 6f | 64 65 3a 34 30 39 3b 20 |.. (Co|de:409; | |00000f00| 4d 73 67 3a 27 43 6f 6e | 66 6c 69 63 74 27 29 2c |Msg:'Con|flict'),| |00000f10| 0d 0a 20 20 20 28 43 6f | 64 65 3a 34 31 30 3b 20 |.. (Co|de:410; | |00000f20| 4d 73 67 3a 27 47 6f 6e | 65 27 29 2c 0d 0a 20 20 |Msg:'Gon|e'),.. | |00000f30| 20 28 43 6f 64 65 3a 34 | 31 31 3b 20 4d 73 67 3a | (Code:4|11; Msg:| |00000f40| 27 4c 65 6e 67 74 68 20 | 52 65 71 75 69 72 65 64 |'Length |Required| |00000f50| 27 29 2c 0d 0a 20 20 20 | 28 43 6f 64 65 3a 34 31 |'),.. |(Code:41| |00000f60| 32 3b 20 4d 73 67 3a 27 | 50 72 65 63 6f 6e 64 69 |2; Msg:'|Precondi| |00000f70| 74 69 6f 6e 20 46 61 69 | 6c 65 64 27 29 2c 0d 0a |tion Fai|led'),..| |00000f80| 20 20 20 28 43 6f 64 65 | 3a 34 31 33 3b 20 4d 73 | (Code|:413; Ms| |00000f90| 67 3a 27 52 65 71 75 65 | 73 74 20 45 6e 74 69 74 |g:'Reque|st Entit| |00000fa0| 79 20 54 6f 6f 20 4c 61 | 72 67 65 27 29 2c 0d 0a |y Too La|rge'),..| |00000fb0| 20 20 20 28 43 6f 64 65 | 3a 34 31 34 3b 20 4d 73 | (Code|:414; Ms| |00000fc0| 67 3a 27 52 65 71 75 65 | 73 74 2d 55 52 49 20 54 |g:'Reque|st-URI T| |00000fd0| 6f 6f 20 4c 61 72 67 65 | 27 29 2c 0d 0a 20 20 20 |oo Large|'),.. | |00000fe0| 28 43 6f 64 65 3a 34 31 | 35 3b 20 4d 73 67 3a 27 |(Code:41|5; Msg:'| |00000ff0| 55 6e 73 75 70 70 6f 72 | 74 65 64 20 4d 65 64 69 |Unsuppor|ted Medi| |00001000| 61 20 54 79 70 65 27 29 | 2c 0d 0a 20 20 20 28 43 |a Type')|,.. (C| |00001010| 6f 64 65 3a 35 30 30 3b | 20 4d 73 67 3a 27 49 6e |ode:500;| Msg:'In| |00001020| 74 65 72 6e 61 6c 20 53 | 65 72 76 65 72 20 45 72 |ternal S|erver Er| |00001030| 72 6f 72 27 29 2c 0d 0a | 20 20 20 28 43 6f 64 65 |ror'),..| (Code| |00001040| 3a 35 30 31 3b 20 4d 73 | 67 3a 27 4e 6f 74 20 49 |:501; Ms|g:'Not I| |00001050| 6d 70 6c 65 6d 65 6e 74 | 65 64 27 29 2c 0d 0a 20 |mplement|ed'),.. | |00001060| 20 20 28 43 6f 64 65 3a | 35 30 32 3b 20 4d 73 67 | (Code:|502; Msg| |00001070| 3a 27 42 61 64 20 47 61 | 74 65 77 61 79 27 29 2c |:'Bad Ga|teway'),| |00001080| 0d 0a 20 20 20 28 43 6f | 64 65 3a 35 30 33 3b 20 |.. (Co|de:503; | |00001090| 4d 73 67 3a 27 53 65 72 | 76 69 63 65 20 55 6e 61 |Msg:'Ser|vice Una| |000010a0| 76 61 69 6c 61 62 6c 65 | 27 29 2c 0d 0a 20 20 20 |vailable|'),.. | |000010b0| 28 43 6f 64 65 3a 35 30 | 34 3b 20 4d 73 67 3a 27 |(Code:50|4; Msg:'| |000010c0| 47 61 74 65 77 61 79 20 | 54 69 6d 65 2d 6f 75 74 |Gateway |Time-out| |000010d0| 27 29 2c 0d 0a 20 20 20 | 28 43 6f 64 65 3a 35 30 |'),.. |(Code:50| |000010e0| 35 3b 20 4d 73 67 3a 27 | 48 54 54 50 20 56 65 72 |5; Msg:'|HTTP Ver| |000010f0| 73 69 6f 6e 20 6e 6f 74 | 20 73 75 70 70 6f 72 74 |sion not| support| |00001100| 65 64 27 29 29 3b 0d 0a | 0d 0a 74 79 70 65 0d 0a |ed'));..|..type..| |00001110| 20 20 54 45 6e 74 69 74 | 79 48 65 61 64 65 72 20 | TEntit|yHeader | |00001120| 3d 20 63 6c 61 73 73 3b | 0d 0a 20 20 54 43 6f 6c |= class;|.. TCol| |00001130| 6c 65 63 74 6f 72 20 3d | 20 63 6c 61 73 73 3b 0d |lector =| class;.| |00001140| 0a 0d 0a 20 20 54 41 62 | 73 74 72 61 63 74 48 74 |... TAb|stractHt| |00001150| 74 70 52 65 73 70 6f 6e | 73 65 44 61 74 61 20 3d |tpRespon|seData =| |00001160| 20 63 6c 61 73 73 0d 0a | 20 20 65 6e 64 3b 0d 0a | class..| end;..| |00001170| 0d 0a 20 20 54 48 74 74 | 70 52 65 73 70 6f 6e 73 |.. THtt|pRespons| |00001180| 65 44 61 74 61 46 69 6c | 65 48 61 6e 64 6c 65 20 |eDataFil|eHandle | |00001190| 3d 20 63 6c 61 73 73 28 | 54 41 62 73 74 72 61 63 |= class(|TAbstrac| |000011a0| 74 48 74 74 70 52 65 73 | 70 6f 6e 73 65 44 61 74 |tHttpRes|ponseDat| |000011b0| 61 29 0d 0a 20 20 20 20 | 46 48 61 6e 64 6c 65 3a |a).. |FHandle:| |000011c0| 20 54 48 61 6e 64 6c 65 | 3b 0d 0a 20 20 20 20 63 | THandle|;.. c| |000011d0| 6f 6e 73 74 72 75 63 74 | 6f 72 20 43 72 65 61 74 |onstruct|or Creat| |000011e0| 65 28 41 48 61 6e 64 6c | 65 3a 20 44 57 4f 52 44 |e(AHandl|e: DWORD| |000011f0| 29 3b 0d 0a 20 20 65 6e | 64 3b 0d 0a 0d 0a 20 20 |);.. en|d;.... | |00001200| 54 48 74 74 70 52 65 73 | 70 6f 6e 73 65 44 61 74 |THttpRes|ponseDat| |00001210| 61 45 6e 74 69 74 79 20 | 3d 20 63 6c 61 73 73 28 |aEntity |= class(| |00001220| 54 41 62 73 74 72 61 63 | 74 48 74 74 70 52 65 73 |TAbstrac|tHttpRes| |00001230| 70 6f 6e 73 65 44 61 74 | 61 29 0d 0a 20 20 20 20 |ponseDat|a).. | |00001240| 46 45 6e 74 69 74 79 48 | 65 61 64 65 72 20 3a 20 |FEntityH|eader : | |00001250| 54 45 6e 74 69 74 79 48 | 65 61 64 65 72 3b 0d 0a |TEntityH|eader;..| |00001260| 20 20 20 20 63 6f 6e 73 | 74 72 75 63 74 6f 72 20 | cons|tructor | |00001270| 43 72 65 61 74 65 28 41 | 45 6e 74 69 74 79 48 65 |Create(A|EntityHe| |00001280| 61 64 65 72 20 3a 20 54 | 45 6e 74 69 74 79 48 65 |ader : T|EntityHe| |00001290| 61 64 65 72 29 3b 0d 0a | 20 20 65 6e 64 3b 0d 0a |ader);..| end;..| |000012a0| 0d 0a 20 20 54 48 74 74 | 70 52 65 73 70 6f 6e 73 |.. THtt|pRespons| |000012b0| 65 45 72 72 6f 72 43 6f | 64 65 20 3d 20 63 6c 61 |eErrorCo|de = cla| |000012c0| 73 73 28 54 41 62 73 74 | 72 61 63 74 48 74 74 70 |ss(TAbst|ractHttp| |000012d0| 52 65 73 70 6f 6e 73 65 | 44 61 74 61 29 0d 0a 20 |Response|Data).. | |000012e0| 20 20 20 46 45 72 72 6f | 72 43 6f 64 65 3a 20 49 | FErro|rCode: I| |000012f0| 6e 74 65 67 65 72 3b 0d | 0a 20 20 20 20 63 6f 6e |nteger;.|. con| |00001300| 73 74 72 75 63 74 6f 72 | 20 43 72 65 61 74 65 28 |structor| Create(| |00001310| 41 45 72 72 6f 72 43 6f | 64 65 3a 20 49 6e 74 65 |AErrorCo|de: Inte| |00001320| 67 65 72 29 3b 0d 0a 20 | 20 65 6e 64 3b 0d 0a 0d |ger);.. | end;...| |00001330| 0a 20 20 50 48 54 54 50 | 53 65 72 76 65 72 54 68 |. PHTTP|ServerTh| |00001340| 72 65 61 64 42 75 66 65 | 72 20 3d 20 5e 54 48 54 |readBufe|r = ^THT| |00001350| 54 50 53 65 72 76 65 72 | 54 68 72 65 61 64 42 75 |TPServer|ThreadBu| |00001360| 66 65 72 3b 0d 0a 20 20 | 54 48 54 54 50 53 65 72 |fer;.. |THTTPSer| |00001370| 76 65 72 54 68 72 65 61 | 64 42 75 66 65 72 20 3d |verThrea|dBufer =| |00001380| 20 61 72 72 61 79 5b 30 | 2e 2e 43 48 54 54 50 53 | array[0|..CHTTPS| |00001390| 65 72 76 65 72 54 68 72 | 65 61 64 42 75 66 53 69 |erverThr|eadBufSi| |000013a0| 7a 65 2d 31 5d 20 6f 66 | 20 43 68 61 72 3b 0d 0a |ze-1] of| Char;..| |000013b0| 0d 0a 20 20 54 50 69 70 | 65 52 65 61 64 53 74 64 |.. TPip|eReadStd| |000013c0| 54 68 72 65 61 64 20 3d | 20 63 6c 61 73 73 28 54 |Thread =| class(T| |000013d0| 54 68 72 65 61 64 29 0d | 0a 20 20 20 20 45 72 72 |Thread).|. Err| |000013e0| 6f 72 3a 20 42 6f 6f 6c | 65 61 6e 3b 0d 0a 20 20 |or: Bool|ean;.. | |000013f0| 20 20 48 50 69 70 65 3a | 20 44 57 4f 52 44 3b 0d | HPipe:| DWORD;.| |00001400| 0a 20 20 20 20 42 75 66 | 66 65 72 3a 20 50 48 54 |. Buf|fer: PHT| |00001410| 54 50 53 65 72 76 65 72 | 54 68 72 65 61 64 42 75 |TPServer|ThreadBu| |00001420| 66 65 72 3b 0d 0a 20 20 | 20 20 45 6e 74 69 74 79 |fer;.. | Entity| |00001430| 48 65 61 64 65 72 3a 20 | 54 45 6e 74 69 74 79 48 |Header: |TEntityH| |00001440| 65 61 64 65 72 3b 0d 0a | 20 20 20 20 43 6f 6c 6c |eader;..| Coll| |00001450| 65 63 74 6f 72 3a 20 54 | 43 6f 6c 6c 65 63 74 6f |ector: T|Collecto| |00001460| 72 3b 0d 0a 20 20 20 20 | 70 72 6f 63 65 64 75 72 |r;.. |procedur| |00001470| 65 20 45 78 65 63 75 74 | 65 3b 20 6f 76 65 72 72 |e Execut|e; overr| |00001480| 69 64 65 3b 0d 0a 20 20 | 65 6e 64 3b 0d 0a 0d 0a |ide;.. |end;....| |00001490| 20 20 54 50 69 70 65 57 | 72 69 74 65 53 74 64 54 | TPipeW|riteStdT| |000014a0| 68 72 65 61 64 20 3d 20 | 63 6c 61 73 73 28 54 54 |hread = |class(TT| |000014b0| 68 72 65 61 64 29 0d 0a | 20 20 20 20 48 50 69 70 |hread)..| HPip| |000014c0| 65 3a 20 44 57 4f 52 44 | 3b 0d 0a 20 20 20 20 73 |e: DWORD|;.. s| |000014d0| 3a 20 73 74 72 69 6e 67 | 3b 0d 0a 20 20 20 20 70 |: string|;.. p| |000014e0| 72 6f 63 65 64 75 72 65 | 20 45 78 65 63 75 74 65 |rocedure| Execute| |000014f0| 3b 20 6f 76 65 72 72 69 | 64 65 3b 0d 0a 20 20 65 |; overri|de;.. e| |00001500| 6e 64 3b 0d 0a 0d 0a 20 | 20 54 50 69 70 65 52 65 |nd;.... | TPipeRe| |00001510| 61 64 45 72 72 54 68 72 | 65 61 64 20 3d 20 63 6c |adErrThr|ead = cl| |00001520| 61 73 73 28 54 54 68 72 | 65 61 64 29 0d 0a 20 20 |ass(TThr|ead).. | |00001530| 20 20 48 50 69 70 65 3a | 20 44 57 4f 52 44 3b 0d | HPipe:| DWORD;.| |00001540| 0a 20 20 20 20 73 3a 20 | 73 74 72 69 6e 67 3b 0d |. s: |string;.| |00001550| 0a 20 20 20 20 70 72 6f | 63 65 64 75 72 65 20 45 |. pro|cedure E| |00001560| 78 65 63 75 74 65 3b 20 | 6f 76 65 72 72 69 64 65 |xecute; |override| |00001570| 3b 0d 0a 20 20 65 6e 64 | 3b 0d 0a 0d 0a 20 20 54 |;.. end|;.... T| |00001580| 43 6f 6e 74 65 6e 74 54 | 79 70 65 20 3d 20 63 6c |ContentT|ype = cl| |00001590| 61 73 73 0d 0a 20 20 20 | 20 43 6f 6e 74 65 6e 74 |ass.. | Content| |000015a0| 54 79 70 65 2c 0d 0a 20 | 20 20 20 45 78 74 65 6e |Type,.. | Exten| |000015b0| 73 69 6f 6e 3a 20 73 74 | 72 69 6e 67 3b 0d 0a 20 |sion: st|ring;.. | |000015c0| 20 65 6e 64 3b 0d 0a 0d | 0a 20 20 54 43 6f 6e 74 | end;...|. TCont| |000015d0| 65 6e 74 54 79 70 65 43 | 6f 6c 6c 20 3d 20 63 6c |entTypeC|oll = cl| |000015e0| 61 73 73 28 54 53 6f 72 | 74 65 64 43 6f 6c 6c 29 |ass(TSor|tedColl)| |000015f0| 0d 0a 20 20 20 20 66 75 | 6e 63 74 69 6f 6e 20 43 |.. fu|nction C| |00001600| 6f 6d 70 61 72 65 28 4b | 65 79 31 2c 20 4b 65 79 |ompare(K|ey1, Key| |00001610| 32 3a 20 50 6f 69 6e 74 | 65 72 29 3a 20 49 6e 74 |2: Point|er): Int| |00001620| 65 67 65 72 3b 20 6f 76 | 65 72 72 69 64 65 3b 0d |eger; ov|erride;.| |00001630| 0a 20 20 20 20 66 75 6e | 63 74 69 6f 6e 20 4b 65 |. fun|ction Ke| |00001640| 79 4f 66 28 49 74 65 6d | 3a 20 50 6f 69 6e 74 65 |yOf(Item|: Pointe| |00001650| 72 29 3a 20 50 6f 69 6e | 74 65 72 3b 20 6f 76 65 |r): Poin|ter; ove| |00001660| 72 72 69 64 65 3b 0d 0a | 20 20 65 6e 64 3b 0d 0a |rride;..| end;..| |00001670| 0d 0a 20 20 54 48 54 54 | 50 44 61 74 61 20 3d 20 |.. THTT|PData = | |00001680| 63 6c 61 73 73 3b 0d 0a | 0d 0a 20 20 54 48 54 54 |class;..|.. THTT| |00001690| 50 53 65 72 76 65 72 54 | 68 72 65 61 64 20 3d 20 |PServerT|hread = | |000016a0| 63 6c 61 73 73 28 54 54 | 68 72 65 61 64 29 0d 0a |class(TT|hread)..| |000016b0| 20 20 20 20 52 65 6d 6f | 74 65 48 6f 73 74 2c 0d | Remo|teHost,.| |000016c0| 0a 20 20 20 20 52 65 6d | 6f 74 65 41 64 64 72 3a |. Rem|oteAddr:| |000016d0| 20 73 74 72 69 6e 67 3b | 0d 0a 20 20 20 20 42 75 | string;|.. Bu| |000016e0| 66 66 65 72 3a 20 54 48 | 54 54 50 53 65 72 76 65 |ffer: TH|TTPServe| |000016f0| 72 54 68 72 65 61 64 42 | 75 66 65 72 3b 0d 0a 20 |rThreadB|ufer;.. | |00001700| 20 20 20 53 6f 63 6b 65 | 74 3a 20 54 53 6f 63 6b | Socke|t: TSock| |00001710| 65 74 3b 0d 0a 20 20 20 | 20 63 6f 6e 73 74 72 75 |et;.. | constru| |00001720| 63 74 6f 72 20 43 72 65 | 61 74 65 3b 0d 0a 20 20 |ctor Cre|ate;.. | |00001730| 20 20 70 72 6f 63 65 64 | 75 72 65 20 50 72 65 70 | proced|ure Prep| |00001740| 61 72 65 52 65 73 70 6f | 6e 73 65 28 64 3a 20 54 |areRespo|nse(d: T| |00001750| 48 54 54 50 44 61 74 61 | 29 3b 0d 0a 20 20 20 20 |HTTPData|);.. | |00001760| 70 72 6f 63 65 64 75 72 | 65 20 45 78 65 63 75 74 |procedur|e Execut| |00001770| 65 3b 20 6f 76 65 72 72 | 69 64 65 3b 0d 0a 20 20 |e; overr|ide;.. | |00001780| 20 20 64 65 73 74 72 75 | 63 74 6f 72 20 44 65 73 | destru|ctor Des| |00001790| 74 72 6f 79 3b 20 6f 76 | 65 72 72 69 64 65 3b 0d |troy; ov|erride;.| |000017a0| 0a 20 20 65 6e 64 3b 0d | 0a 0d 0a 20 20 54 47 65 |. end;.|... TGe| |000017b0| 6e 65 72 61 6c 48 65 61 | 64 65 72 20 3d 20 63 6c |neralHea|der = cl| |000017c0| 61 73 73 0d 0a 20 20 20 | 20 43 61 63 68 65 43 6f |ass.. | CacheCo| |000017d0| 6e 74 72 6f 6c 2c 20 20 | 20 20 20 20 20 20 20 20 |ntrol, | | |000017e0| 20 20 2f 2f 20 53 65 63 | 74 69 6f 6e 20 31 34 2e | // Sec|tion 14.| |000017f0| 39 0d 0a 20 20 20 20 43 | 6f 6e 6e 65 63 74 69 6f |9.. C|onnectio| |00001800| 6e 2c 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |n, | | |00001810| 2f 2f 20 53 65 63 74 69 | 6f 6e 20 31 34 2e 31 30 |// Secti|on 14.10| |00001820| 0d 0a 20 20 20 20 44 61 | 74 65 2c 20 20 20 20 20 |.. Da|te, | |00001830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | | /| |00001840| 2f 20 53 65 63 74 69 6f | 6e 20 31 34 2e 31 39 0d |/ Sectio|n 14.19.| |00001850| 0a 20 20 20 20 50 72 61 | 67 6d 61 2c 20 20 20 20 |. Pra|gma, | |00001860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2f | | //| |00001870| 20 53 65 63 74 69 6f 6e | 20 31 34 2e 33 32 0d 0a | Section| 14.32..| |00001880| 20 20 20 20 54 72 61 6e | 73 66 65 72 45 6e 63 6f | Tran|sferEnco| |00001890| 64 69 6e 67 2c 20 20 20 | 20 20 20 20 20 2f 2f 20 |ding, | // | |000018a0| 53 65 63 74 69 6f 6e 20 | 31 34 2e 34 30 0d 0a 20 |Section |14.40.. | |000018b0| 20 20 20 55 70 67 72 61 | 64 65 2c 20 20 20 20 20 | Upgra|de, | |000018c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2f 20 53 | | // S| |000018d0| 65 63 74 69 6f 6e 20 31 | 34 2e 34 31 0d 0a 20 20 |ection 1|4.41.. | |000018e0| 20 20 56 69 61 20 3a 20 | 73 74 72 69 6e 67 3b 20 | Via : |string; | |000018f0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 53 65 | | // Se| |00001900| 63 74 69 6f 6e 20 31 34 | 2e 34 34 0d 0a 20 20 20 |ction 14|.44.. | |00001910| 20 66 75 6e 63 74 69 6f | 6e 20 46 69 6c 74 65 72 | functio|n Filter| |00001920| 28 63 6f 6e 73 74 20 7a | 2c 20 73 3a 20 73 74 72 |(const z|, s: str| |00001930| 69 6e 67 29 3a 20 42 6f | 6f 6c 65 61 6e 3b 0d 0a |ing): Bo|olean;..| |00001940| 20 20 20 20 66 75 6e 63 | 74 69 6f 6e 20 4f 75 74 | func|tion Out| |00001950| 53 74 72 69 6e 67 3a 20 | 73 74 72 69 6e 67 3b 0d |String: |string;.| |00001960| 0a 20 20 65 6e 64 3b 0d | 0a 0d 0a 0d 0a 20 20 54 |. end;.|..... T| |00001970| 52 65 73 70 6f 6e 73 65 | 48 65 61 64 65 72 20 3d |Response|Header =| |00001980| 20 63 6c 61 73 73 0d 0a | 20 20 20 20 41 67 65 2c | class..| Age,| |00001990| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000019a0| 20 20 20 20 2f 2f 20 53 | 65 63 74 69 6f 6e 20 31 | // S|ection 1| |000019b0| 34 2e 36 0d 0a 20 20 20 | 20 4c 6f 63 61 74 69 6f |4.6.. | Locatio| |000019c0| 6e 2c 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |n, | | |000019d0| 20 2f 2f 20 53 65 63 74 | 69 6f 6e 20 31 34 2e 33 | // Sect|ion 14.3| |000019e0| 30 0d 0a 20 20 20 20 50 | 72 6f 78 79 41 75 74 68 |0.. P|roxyAuth| |000019f0| 65 6e 74 69 63 61 74 65 | 2c 20 20 20 20 20 20 2f |enticate|, /| |00001a00| 2f 20 53 65 63 74 69 6f | 6e 20 31 34 2e 33 33 0d |/ Sectio|n 14.33.| |00001a10| 0a 20 20 20 20 50 75 62 | 6c 69 63 5f 2c 20 20 20 |. Pub|lic_, | |00001a20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2f 20 | | // | |00001a30| 53 65 63 74 69 6f 6e 20 | 31 34 2e 33 35 0d 0a 20 |Section |14.35.. | |00001a40| 20 20 20 52 65 74 72 79 | 41 66 74 65 72 2c 20 20 | Retry|After, | |00001a50| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 53 65 | | // Se| |00001a60| 63 74 69 6f 6e 20 31 34 | 2e 33 38 0d 0a 20 20 20 |ction 14|.38.. | |00001a70| 20 53 65 72 76 65 72 2c | 20 20 20 20 20 20 20 20 | Server,| | |00001a80| 20 20 20 20 20 20 20 20 | 20 2f 2f 20 53 65 63 74 | | // Sect| |00001a90| 69 6f 6e 20 31 34 2e 33 | 39 0d 0a 20 20 20 20 56 |ion 14.3|9.. V| |00001aa0| 61 72 79 2c 20 20 20 20 | 20 20 20 20 20 20 20 20 |ary, | | |00001ab0| 20 20 20 20 20 20 20 2f | 2f 20 53 65 63 74 69 6f | /|/ Sectio| |00001ac0| 6e 20 31 34 2e 34 33 0d | 0a 20 20 20 20 57 61 72 |n 14.43.|. War| |00001ad0| 6e 69 6e 67 2c 20 20 20 | 20 20 20 20 20 20 20 20 |ning, | | |00001ae0| 20 20 20 20 20 2f 2f 20 | 53 65 63 74 69 6f 6e 20 | // |Section | |00001af0| 31 34 2e 34 35 0d 0a 20 | 20 20 20 57 57 57 41 75 |14.45.. | WWWAu| |00001b00| 74 68 65 6e 74 69 63 61 | 74 65 20 20 20 20 20 20 |thentica|te | |00001b10| 20 20 20 2f 2f 20 53 65 | 63 74 69 6f 6e 20 31 34 | // Se|ction 14| |00001b20| 2e 34 36 0d 0a 20 20 20 | 20 20 20 3a 20 73 74 72 |.46.. | : str| |00001b30| 69 6e 67 3b 0d 0a 20 20 | 20 20 66 75 6e 63 74 69 |ing;.. | functi| |00001b40| 6f 6e 20 4f 75 74 53 74 | 72 69 6e 67 3a 20 73 74 |on OutSt|ring: st| |00001b50| 72 69 6e 67 3b 0d 0a 20 | 20 65 6e 64 3b 0d 0a 0d |ring;.. | end;...| |00001b60| 0a 20 20 54 52 65 71 75 | 65 73 74 48 65 61 64 65 |. TRequ|estHeade| |00001b70| 72 20 3d 20 63 6c 61 73 | 73 0d 0a 20 20 20 20 41 |r = clas|s.. A| |00001b80| 63 63 65 70 74 2c 20 20 | 20 20 20 20 20 20 20 20 |ccept, | | |00001b90| 20 20 20 20 20 20 20 20 | 2f 2f 20 53 65 63 74 69 | |// Secti| |00001ba0| 6f 6e 20 31 34 2e 31 0d | 0a 20 20 20 20 41 63 63 |on 14.1.|. Acc| |00001bb0| 65 70 74 43 68 61 72 73 | 65 74 2c 20 20 20 20 20 |eptChars|et, | |00001bc0| 20 20 20 20 20 20 2f 2f | 20 53 65 63 74 69 6f 6e | //| Section| |00001bd0| 20 31 34 2e 32 0d 0a 20 | 20 20 20 41 63 63 65 70 | 14.2.. | Accep| |00001be0| 74 45 6e 63 6f 64 69 6e | 67 2c 20 20 20 20 20 20 |tEncodin|g, | |00001bf0| 20 20 20 20 2f 2f 20 53 | 65 63 74 69 6f 6e 20 31 | // S|ection 1| |00001c00| 34 2e 33 0d 0a 20 20 20 | 20 41 63 63 65 70 74 4c |4.3.. | AcceptL| |00001c10| 61 6e 67 75 61 67 65 2c | 20 20 20 20 20 20 20 20 |anguage,| | |00001c20| 20 20 2f 2f 20 53 65 63 | 74 69 6f 6e 20 31 34 2e | // Sec|tion 14.| |00001c30| 34 0d 0a 20 20 20 20 41 | 75 74 68 6f 72 69 7a 61 |4.. A|uthoriza| |00001c40| 74 69 6f 6e 2c 20 20 20 | 20 20 20 20 20 20 20 20 |tion, | | |00001c50| 2f 2f 20 53 65 63 74 69 | 6f 6e 20 31 34 2e 38 0d |// Secti|on 14.8.| |00001c60| 0a 20 20 20 20 46 72 6f | 6d 2c 20 20 20 20 20 20 |. Fro|m, | |00001c70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2f | | //| |00001c80| 20 53 65 63 74 69 6f 6e | 20 31 34 2e 32 32 0d 0a | Section| 14.22..| |00001c90| 20 20 20 20 48 6f 73 74 | 2c 20 20 20 20 20 20 20 | Host|, | |00001ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2f 20 | | // | |00001cb0| 53 65 63 74 69 6f 6e 20 | 31 34 2e 32 33 0d 0a 20 |Section |14.23.. | |00001cc0| 20 20 20 49 66 4d 6f 64 | 69 66 69 65 64 53 69 6e | IfMod|ifiedSin| |00001cd0| 63 65 2c 20 20 20 20 20 | 20 20 20 20 2f 2f 20 53 |ce, | // S| |00001ce0| 65 63 74 69 6f 6e 20 31 | 34 2e 32 34 0d 0a 20 20 |ection 1|4.24.. | |00001cf0| 20 20 49 66 4d 61 74 63 | 68 2c 20 20 20 20 20 20 | IfMatc|h, | |00001d00| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 53 65 | | // Se| |00001d10| 63 74 69 6f 6e 20 31 34 | 2e 32 35 0d 0a 20 20 20 |ction 14|.25.. | |00001d20| 20 49 66 4e 6f 6e 65 4d | 61 74 63 68 2c 20 20 20 | IfNoneM|atch, | |00001d30| 20 20 20 20 20 20 20 20 | 20 20 2f 2f 20 53 65 63 | | // Sec| |00001d40| 74 69 6f 6e 20 31 34 2e | 32 36 0d 0a 20 20 20 20 |tion 14.|26.. | |00001d50| 49 66 52 61 6e 67 65 2c | 20 20 20 20 20 20 20 20 |IfRange,| | |00001d60| 20 20 20 20 20 20 20 20 | 20 2f 2f 20 53 65 63 74 | | // Sect| |00001d70| 69 6f 6e 20 31 34 2e 32 | 37 0d 0a 20 20 20 20 49 |ion 14.2|7.. I| |00001d80| 66 55 6e 6d 6f 64 69 66 | 69 65 64 53 69 6e 63 65 |fUnmodif|iedSince| |00001d90| 2c 20 20 20 20 20 20 20 | 2f 2f 20 53 65 63 74 69 |, |// Secti| |00001da0| 6f 6e 20 31 34 2e 32 38 | 0d 0a 20 20 20 20 4d 61 |on 14.28|.. Ma| |00001db0| 78 46 6f 72 77 61 72 64 | 73 2c 20 20 20 20 20 20 |xForward|s, | |00001dc0| 20 20 20 20 20 20 20 2f | 2f 20 53 65 63 74 69 6f | /|/ Sectio| |00001dd0| 6e 20 31 34 2e 33 31 0d | 0a 20 20 20 20 50 72 6f |n 14.31.|. Pro| |00001de0| 78 79 41 75 74 68 6f 72 | 69 7a 61 74 69 6f 6e 2c |xyAuthor|ization,| |00001df0| 20 20 20 20 20 20 2f 2f | 20 53 65 63 74 69 6f 6e | //| Section| |00001e00| 20 31 34 2e 33 34 0d 0a | 20 20 20 20 52 61 6e 67 | 14.34..| Rang| |00001e10| 65 2c 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e, | | |00001e20| 20 20 20 20 20 2f 2f 20 | 53 65 63 74 69 6f 6e 20 | // |Section | |00001e30| 31 34 2e 33 36 0d 0a 20 | 20 20 20 52 65 66 65 72 |14.36.. | Refer| |00001e40| 65 72 2c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |er, | | |00001e50| 20 20 20 20 2f 2f 20 53 | 65 63 74 69 6f 6e 20 31 | // S|ection 1| |00001e60| 34 2e 33 37 0d 0a 20 20 | 20 20 55 73 65 72 41 67 |4.37.. | UserAg| |00001e70| 65 6e 74 2c 20 20 20 20 | 20 20 20 20 20 20 20 20 |ent, | | |00001e80| 20 20 20 2f 2f 20 53 65 | 63 74 69 6f 6e 20 31 34 | // Se|ction 14| |00001e90| 2e 34 32 0d 0a 20 20 20 | 20 43 6f 6f 6b 69 65 3a |.42.. | Cookie:| |00001ea0| 20 73 74 72 69 6e 67 3b | 20 20 20 20 20 20 20 20 | string;| | |00001eb0| 20 20 2f 2f 20 72 66 63 | 2d 32 31 30 39 0d 0a 20 | // rfc|-2109.. | |00001ec0| 20 20 20 66 75 6e 63 74 | 69 6f 6e 20 46 69 6c 74 | funct|ion Filt| |00001ed0| 65 72 28 63 6f 6e 73 74 | 20 7a 2c 20 73 3a 20 73 |er(const| z, s: s| |00001ee0| 74 72 69 6e 67 29 3a 20 | 42 6f 6f 6c 65 61 6e 3b |tring): |Boolean;| |00001ef0| 0d 0a 20 20 65 6e 64 3b | 0d 0a 0d 0a 20 20 54 43 |.. end;|.... TC| |00001f00| 6f 6c 6c 65 63 74 6f 72 | 20 3d 20 63 6c 61 73 73 |ollector| = class| |00001f10| 0d 0a 20 20 70 72 69 76 | 61 74 65 0d 0a 20 20 20 |.. priv|ate.. | |00001f20| 20 50 61 72 73 65 64 3a | 20 42 6f 6f 6c 65 61 6e | Parsed:| Boolean| |00001f30| 3b 0d 0a 20 20 20 20 4c | 69 6e 65 73 3a 20 54 53 |;.. L|ines: TS| |00001f40| 74 72 69 6e 67 43 6f 6c | 6c 3b 0d 0a 20 20 20 20 |tringCol|l;.. | |00001f50| 43 6f 6c 6c 65 63 74 53 | 74 72 3a 20 73 74 72 69 |CollectS|tr: stri| |00001f60| 6e 67 3b 0d 0a 20 20 20 | 20 43 6f 6c 6c 65 63 74 |ng;.. | Collect| |00001f70| 4c 65 6e 3a 20 49 6e 74 | 65 67 65 72 3b 0d 0a 20 |Len: Int|eger;.. | |00001f80| 20 20 20 43 6f 6e 74 65 | 6e 74 4c 65 6e 67 74 68 | Conte|ntLength| |00001f90| 3a 20 49 6e 74 65 67 65 | 72 3b 0d 0a 20 20 70 75 |: Intege|r;.. pu| |00001fa0| 62 6c 69 63 0d 0a 20 20 | 20 20 45 6e 74 69 74 79 |blic.. | Entity| |00001fb0| 42 6f 64 79 3a 20 73 74 | 72 69 6e 67 3b 0d 0a 20 |Body: st|ring;.. | |00001fc0| 20 20 20 47 6f 74 45 6e | 74 69 74 79 42 6f 64 79 | GotEn|tityBody| |00001fd0| 2c 0d 0a 20 20 20 20 43 | 6f 6c 6c 65 63 74 45 6e |,.. C|ollectEn| |00001fe0| 74 69 74 79 42 6f 64 79 | 3a 20 42 6f 6f 6c 65 61 |tityBody|: Boolea| |00001ff0| 6e 3b 0d 0a 20 20 20 20 | 66 75 6e 63 74 69 6f 6e |n;.. |function| |00002000| 20 43 6f 6c 6c 65 63 74 | 28 76 61 72 20 42 75 66 | Collect|(var Buf| |00002010| 3a 20 54 48 54 54 50 53 | 65 72 76 65 72 54 68 72 |: THTTPS|erverThr| |00002020| 65 61 64 42 75 66 65 72 | 3b 20 6a 3a 20 49 6e 74 |eadBufer|; j: Int| |00002030| 65 67 65 72 29 3a 20 42 | 6f 6f 6c 65 61 6e 3b 0d |eger): B|oolean;.| |00002040| 0a 20 20 20 20 63 6f 6e | 73 74 72 75 63 74 6f 72 |. con|structor| |00002050| 20 43 72 65 61 74 65 3b | 0d 0a 20 20 20 20 64 65 | Create;|.. de| |00002060| 73 74 72 75 63 74 6f 72 | 20 44 65 73 74 72 6f 79 |structor| Destroy| |00002070| 3b 20 6f 76 65 72 72 69 | 64 65 3b 0d 0a 20 20 20 |; overri|de;.. | |00002080| 20 66 75 6e 63 74 69 6f | 6e 20 47 65 74 4e 65 78 | functio|n GetNex| |00002090| 74 4c 69 6e 65 3a 20 73 | 74 72 69 6e 67 3b 0d 0a |tLine: s|tring;..| |000020a0| 20 20 20 20 66 75 6e 63 | 74 69 6f 6e 20 4c 69 6e | func|tion Lin| |000020b0| 65 41 76 61 69 6c 3a 20 | 42 6f 6f 6c 65 61 6e 3b |eAvail: |Boolean;| |000020c0| 0d 0a 20 20 20 20 70 72 | 6f 63 65 64 75 72 65 20 |.. pr|ocedure | |000020d0| 53 65 74 43 6f 6e 74 65 | 6e 74 4c 65 6e 67 74 68 |SetConte|ntLength| |000020e0| 28 69 3a 20 49 6e 74 65 | 67 65 72 29 3b 0d 0a 20 |(i: Inte|ger);.. | |000020f0| 20 65 6e 64 3b 0d 0a 0d | 0a 0d 0a 20 20 54 45 6e | end;...|... TEn| |00002100| 74 69 74 79 48 65 61 64 | 65 72 20 3d 20 63 6c 61 |tityHead|er = cla| |00002110| 73 73 0d 0a 20 20 20 20 | 41 6c 6c 6f 77 2c 20 20 |ss.. |Allow, | |00002120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002130| 20 2f 2f 20 53 65 63 74 | 69 6f 6e 20 31 34 2e 37 | // Sect|ion 14.7| |00002140| 0d 0a 20 20 20 20 43 6f | 6e 74 65 6e 74 42 61 73 |.. Co|ntentBas| |00002150| 65 2c 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f |e, | /| |00002160| 2f 20 53 65 63 74 69 6f | 6e 20 31 34 2e 31 31 0d |/ Sectio|n 14.11.| |00002170| 0a 20 20 20 20 43 6f 6e | 74 65 6e 74 45 6e 63 6f |. Con|tentEnco| |00002180| 64 69 6e 67 2c 20 20 20 | 20 20 20 20 20 20 2f 2f |ding, | //| |00002190| 20 53 65 63 74 69 6f 6e | 20 31 34 2e 31 32 0d 0a | Section| 14.12..| |000021a0| 20 20 20 20 43 6f 6e 74 | 65 6e 74 4c 61 6e 67 75 | Cont|entLangu| |000021b0| 61 67 65 2c 20 20 20 20 | 20 20 20 20 20 2f 2f 20 |age, | // | |000021c0| 53 65 63 74 69 6f 6e 20 | 31 34 2e 31 33 0d 0a 20 |Section |14.13.. | |000021d0| 20 20 20 43 6f 6e 74 65 | 6e 74 4c 65 6e 67 74 68 | Conte|ntLength| |000021e0| 2c 20 20 20 20 20 20 20 | 20 20 20 20 2f 2f 20 53 |, | // S| |000021f0| 65 63 74 69 6f 6e 20 31 | 34 2e 31 34 0d 0a 20 20 |ection 1|4.14.. | |00002200| 20 20 43 6f 6e 74 65 6e | 74 4c 6f 63 61 74 69 6f | Conten|tLocatio| |00002210| 6e 2c 20 20 20 20 20 20 | 20 20 20 2f 2f 20 53 65 |n, | // Se| |00002220| 63 74 69 6f 6e 20 31 34 | 2e 31 35 0d 0a 20 20 20 |ction 14|.15.. | |00002230| 20 43 6f 6e 74 65 6e 74 | 4d 44 35 2c 20 20 20 20 | Content|MD5, | |00002240| 20 20 20 20 20 20 20 20 | 20 20 2f 2f 20 53 65 63 | | // Sec| |00002250| 74 69 6f 6e 20 31 34 2e | 31 36 0d 0a 20 20 20 20 |tion 14.|16.. | |00002260| 43 6f 6e 74 65 6e 74 52 | 61 6e 67 65 2c 20 20 20 |ContentR|ange, | |00002270| 20 20 20 20 20 20 20 20 | 20 2f 2f 20 53 65 63 74 | | // Sect| |00002280| 69 6f 6e 20 31 34 2e 31 | 37 0d 0a 20 20 20 20 43 |ion 14.1|7.. C| |00002290| 6f 6e 74 65 6e 74 54 79 | 70 65 2c 20 20 20 20 20 |ontentTy|pe, | |000022a0| 20 20 20 20 20 20 20 20 | 2f 2f 20 53 65 63 74 69 | |// Secti| |000022b0| 6f 6e 20 31 34 2e 31 38 | 0d 0a 20 20 20 20 45 54 |on 14.18|.. ET| |000022c0| 61 67 2c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ag, | | |000022d0| 20 20 20 20 20 20 20 2f | 2f 20 53 65 63 74 69 6f | /|/ Sectio| |000022e0| 6e 20 31 34 2e 32 30 0d | 0a 20 20 20 20 45 78 70 |n 14.20.|. Exp| |000022f0| 69 72 65 73 2c 20 20 20 | 20 20 20 20 20 20 20 20 |ires, | | |00002300| 20 20 20 20 20 20 2f 2f | 20 53 65 63 74 69 6f 6e | //| Section| |00002310| 20 31 34 2e 32 31 0d 0a | 20 20 20 20 4c 61 73 74 | 14.21..| Last| |00002320| 4d 6f 64 69 66 69 65 64 | 2c 20 20 20 20 20 20 20 |Modified|, | |00002330| 20 20 20 20 20 2f 2f 20 | 53 65 63 74 69 6f 6e 20 | // |Section | |00002340| 31 34 2e 32 39 0d 0a 20 | 20 20 20 7b 54 68 69 73 |14.29.. | {This| |00002350| 20 69 73 20 74 77 6f 20 | 68 65 61 64 65 72 73 20 | is two |headers | |00002360| 66 6f 72 20 66 69 6c 65 | 20 64 6f 77 6e 6c 6f 61 |for file| downloa| |00002370| 64 20 62 79 20 43 47 49 | 7d 0d 0a 20 20 20 20 41 |d by CGI|}.. A| |00002380| 63 63 65 70 74 52 61 6e | 67 65 73 2c 20 20 20 20 |cceptRan|ges, | |00002390| 20 20 20 20 20 20 20 20 | 2f 2f 20 53 65 63 74 69 | |// Secti| |000023a0| 6f 6e 20 31 34 2e 35 0d | 0a 20 20 20 20 43 6f 6e |on 14.5.|. Con| |000023b0| 74 65 6e 74 44 69 73 70 | 6f 73 69 74 69 6f 6e 2c |tentDisp|osition,| |000023c0| 20 20 20 20 20 20 2f 2f | 20 53 65 63 74 69 6f 6e | //| Section| |000023d0| 20 31 35 2e 31 30 0d 0a | 20 20 20 20 45 6e 74 69 | 15.10..| Enti| |000023e0| 74 79 42 6f 64 79 3a 20 | 73 74 72 69 6e 67 3b 0d |tyBody: |string;.| |000023f0| 0a 20 20 20 20 45 6e 74 | 69 74 79 4c 65 6e 67 74 |. Ent|ityLengt| |00002400| 68 3a 20 49 6e 74 65 67 | 65 72 3b 0d 0a 20 20 20 |h: Integ|er;.. | |00002410| 20 53 65 74 43 6f 6f 6b | 69 65 2c 0d 0a 20 20 20 | SetCook|ie,.. | |00002420| 20 43 47 49 53 74 61 74 | 75 73 2c 0d 0a 20 20 20 | CGIStat|us,.. | |00002430| 20 43 47 49 4c 6f 63 61 | 74 69 6f 6e 3a 20 73 74 | CGILoca|tion: st| |00002440| 72 69 6e 67 3b 0d 0a 20 | 20 20 20 66 75 6e 63 74 |ring;.. | funct| |00002450| 69 6f 6e 20 46 69 6c 74 | 65 72 28 63 6f 6e 73 74 |ion Filt|er(const| |00002460| 20 7a 2c 20 73 3a 20 73 | 74 72 69 6e 67 29 3a 20 | z, s: s|tring): | |00002470| 42 6f 6f 6c 65 61 6e 3b | 0d 0a 20 20 20 20 70 72 |Boolean;|.. pr| |00002480| 6f 63 65 64 75 72 65 20 | 43 6f 70 79 45 6e 74 69 |ocedure |CopyEnti| |00002490| 74 79 42 6f 64 79 28 43 | 6f 6c 6c 65 63 74 6f 72 |tyBody(C|ollector| |000024a0| 3a 20 54 43 6f 6c 6c 65 | 63 74 6f 72 29 3b 0d 0a |: TColle|ctor);..| |000024b0| 20 20 20 20 66 75 6e 63 | 74 69 6f 6e 20 4f 75 74 | func|tion Out| |000024c0| 53 74 72 69 6e 67 3a 20 | 73 74 72 69 6e 67 3b 0d |String: |string;.| |000024d0| 0a 20 20 65 6e 64 3b 0d | 0a 0d 0a 20 20 54 48 54 |. end;.|... THT| |000024e0| 54 50 44 61 74 61 20 3d | 20 63 6c 61 73 73 0d 0a |TPData =| class..| |000024f0| 20 20 20 20 52 65 71 75 | 65 73 74 43 6f 6c 6c 65 | Requ|estColle| |00002500| 63 74 6f 72 3a 20 54 43 | 6f 6c 6c 65 63 74 6f 72 |ctor: TC|ollector| |00002510| 3b 0d 0a 20 20 20 20 46 | 69 6c 65 4e 66 6f 3a 20 |;.. F|ileNfo: | |00002520| 54 46 69 6c 65 49 4e 66 | 6f 3b 0d 0a 0d 0a 20 20 |TFileINf|o;.... | |00002530| 20 20 46 48 61 6e 64 6c | 65 3a 20 54 48 61 6e 64 | FHandl|e: THand| |00002540| 6c 65 3b 0d 0a 20 20 20 | 20 53 74 61 74 75 73 43 |le;.. | StatusC| |00002550| 6f 64 65 2c 0d 0a 20 20 | 20 20 48 54 54 50 56 65 |ode,.. | HTTPVe| |00002560| 72 73 69 6f 6e 48 69 2c | 0d 0a 20 20 20 20 48 54 |rsionHi,|.. HT| |00002570| 54 50 56 65 72 73 69 6f | 6e 4c 6f 3a 20 49 6e 74 |TPVersio|nLo: Int| |00002580| 65 67 65 72 3b 0d 0a 0d | 0a 20 20 20 20 54 72 61 |eger;...|. Tra| |00002590| 6e 73 66 65 72 46 69 6c | 65 2c 0d 0a 20 20 20 20 |nsferFil|e,.. | |000025a0| 52 65 70 6f 72 74 45 72 | 72 6f 72 2c 0d 0a 20 20 |ReportEr|ror,.. | |000025b0| 20 20 4b 65 65 70 41 6c | 69 76 65 3a 20 42 6f 6f | KeepAl|ive: Boo| |000025c0| 6c 65 61 6e 3b 0d 0a 0d | 0a 20 20 20 20 45 72 72 |lean;...|. Err| |000025d0| 6f 72 4d 73 67 2c 0d 0a | 20 20 20 20 4d 65 74 68 |orMsg,..| Meth| |000025e0| 6f 64 2c 20 52 65 71 75 | 65 73 74 55 52 49 2c 20 |od, Requ|estURI, | |000025f0| 48 54 54 50 56 65 72 73 | 69 6f 6e 2c 20 41 75 74 |HTTPVers|ion, Aut| |00002600| 68 55 73 65 72 2c 20 41 | 75 74 68 50 61 73 73 77 |hUser, A|uthPassw| |00002610| 6f 72 64 2c 20 41 75 74 | 68 54 79 70 65 2c 0d 0a |ord, Aut|hType,..| |00002620| 20 20 20 20 55 52 49 50 | 61 74 68 2c 20 55 52 49 | URIP|ath, URI| |00002630| 50 61 72 61 6d 73 2c 20 | 55 52 49 51 75 65 72 79 |Params, |URIQuery| |00002640| 2c 20 55 52 49 51 75 65 | 72 79 50 61 72 61 6d 20 |, URIQue|ryParam | |00002650| 3a 20 73 74 72 69 6e 67 | 3b 0d 0a 0d 0a 20 20 20 |: string|;.... | |00002660| 20 52 65 73 70 6f 6e 63 | 65 4f 62 6a 65 63 74 69 | Responc|eObjecti| |00002670| 76 65 3a 20 54 41 62 73 | 74 72 61 63 74 48 74 74 |ve: TAbs|tractHtt| |00002680| 70 52 65 73 70 6f 6e 73 | 65 44 61 74 61 3b 0d 0a |pRespons|eData;..| |00002690| 0d 0a 20 20 20 20 52 65 | 71 75 65 73 74 47 65 6e |.. Re|questGen| |000026a0| 65 72 61 6c 48 65 61 64 | 65 72 3a 20 54 47 65 6e |eralHead|er: TGen| |000026b0| 65 72 61 6c 48 65 61 64 | 65 72 3b 0d 0a 20 20 20 |eralHead|er;.. | |000026c0| 20 52 65 71 75 65 73 74 | 52 65 71 75 65 73 74 48 | Request|RequestH| |000026d0| 65 61 64 65 72 3a 20 54 | 52 65 71 75 65 73 74 48 |eader: T|RequestH| |000026e0| 65 61 64 65 72 3b 0d 0a | 20 20 20 20 52 65 71 75 |eader;..| Requ| |000026f0| 65 73 74 45 6e 74 69 74 | 79 48 65 61 64 65 72 3a |estEntit|yHeader:| |00002700| 20 54 45 6e 74 69 74 79 | 48 65 61 64 65 72 3b 0d | TEntity|Header;.| |00002710| 0a 0d 0a 20 20 20 20 52 | 65 73 70 6f 6e 73 65 47 |... R|esponseG| |00002720| 65 6e 65 72 61 6c 48 65 | 61 64 65 72 3a 20 54 47 |eneralHe|ader: TG| |00002730| 65 6e 65 72 61 6c 48 65 | 61 64 65 72 3b 0d 0a 20 |eneralHe|ader;.. | |00002740| 20 20 20 52 65 73 70 6f | 6e 73 65 52 65 73 70 6f | Respo|nseRespo| |00002750| 6e 73 65 48 65 61 64 65 | 72 3a 20 54 52 65 73 70 |nseHeade|r: TResp| |00002760| 6f 6e 73 65 48 65 61 64 | 65 72 3b 0d 0a 20 20 20 |onseHead|er;.. | |00002770| 20 52 65 73 70 6f 6e 73 | 65 45 6e 74 69 74 79 48 | Respons|eEntityH| |00002780| 65 61 64 65 72 3a 20 54 | 45 6e 74 69 74 79 48 65 |eader: T|EntityHe| |00002790| 61 64 65 72 3b 0d 0a 0d | 0a 20 20 20 20 63 6f 6e |ader;...|. con| |000027a0| 73 74 72 75 63 74 6f 72 | 20 43 72 65 61 74 65 3b |structor| Create;| |000027b0| 0d 0a 20 20 20 20 64 65 | 73 74 72 75 63 74 6f 72 |.. de|structor| |000027c0| 20 44 65 73 74 72 6f 79 | 3b 20 6f 76 65 72 72 69 | Destroy|; overri| |000027d0| 64 65 3b 0d 0a 0d 0a 20 | 20 65 6e 64 3b 0d 0a 0d |de;.... | end;...| |000027e0| 0a 76 61 72 0d 0a 20 20 | 43 6f 6e 74 65 6e 74 54 |.var.. |ContentT| |000027f0| 79 70 65 73 3a 20 54 43 | 6f 6e 74 65 6e 74 54 79 |ypes: TC|ontentTy| |00002800| 70 65 43 6f 6c 6c 3b 0d | 0a 20 20 50 61 72 61 6d |peColl;.|. Param| |00002810| 53 74 72 31 2c 0d 0a 20 | 20 46 41 63 63 65 73 73 |Str1,.. | FAccess| |00002820| 4c 6f 67 2c 0d 0a 20 20 | 46 41 67 65 6e 74 4c 6f |Log,.. |FAgentLo| |00002830| 67 2c 0d 0a 20 20 46 45 | 72 72 6f 72 4c 6f 67 2c |g,.. FE|rrorLog,| |00002840| 0d 0a 20 20 46 52 65 66 | 65 72 65 72 4c 6f 67 3a |.. FRef|ererLog:| |00002850| 20 73 74 72 69 6e 67 3b | 0d 0a 20 20 43 53 41 63 | string;|.. CSAc| |00002860| 63 65 73 73 4c 6f 67 2c | 0d 0a 20 20 43 53 41 67 |cessLog,|.. CSAg| |00002870| 65 6e 74 4c 6f 67 2c 0d | 0a 20 20 43 53 45 72 72 |entLog,.|. CSErr| |00002880| 6f 72 4c 6f 67 2c 0d 0a | 20 20 43 53 52 65 66 65 |orLog,..| CSRefe| |00002890| 72 65 72 4c 6f 67 3a 20 | 54 52 54 4c 43 72 69 74 |rerLog: |TRTLCrit| |000028a0| 69 63 61 6c 53 65 63 74 | 69 6f 6e 3b 0d 0a 20 20 |icalSect|ion;.. | |000028b0| 48 41 63 63 65 73 73 4c | 6f 67 2c 0d 0a 20 20 48 |HAccessL|og,.. H| |000028c0| 41 67 65 6e 74 4c 6f 67 | 2c 0d 0a 20 20 48 45 72 |AgentLog|,.. HEr| |000028d0| 72 6f 72 4c 6f 67 2c 0d | 0a 20 20 48 52 65 66 65 |rorLog,.|. HRefe| |000028e0| 72 65 72 4c 6f 67 3a 20 | 44 57 4f 52 44 3b 0d 0a |rerLog: |DWORD;..| |000028f0| 0d 0a 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 46 69 6c |....func|tion Fil| |00002900| 65 54 69 6d 65 54 6f 53 | 74 72 28 41 54 3a 20 44 |eTimeToS|tr(AT: D| |00002910| 57 4f 52 44 29 3a 20 73 | 74 72 69 6e 67 3b 0d 0a |WORD): s|tring;..| |00002920| 63 6f 6e 73 74 0d 0a 20 | 20 77 6b 64 61 79 3a 20 |const.. | wkday: | |00002930| 61 72 72 61 79 5b 30 2e | 2e 36 5d 20 6f 66 20 73 |array[0.|.6] of s| |00002940| 74 72 69 6e 67 20 3d 20 | 28 27 53 75 6e 27 2c 20 |tring = |('Sun', | |00002950| 27 4d 6f 6e 27 2c 20 27 | 54 75 65 27 2c 20 27 57 |'Mon', '|Tue', 'W| |00002960| 65 64 27 2c 20 27 54 68 | 75 27 2c 20 27 46 72 69 |ed', 'Th|u', 'Fri| |00002970| 27 2c 20 27 53 61 74 27 | 29 3b 0d 0a 76 61 72 0d |', 'Sat'|);..var.| |00002980| 0a 20 20 44 3a 20 54 53 | 79 73 74 65 6d 54 69 6d |. D: TS|ystemTim| |00002990| 65 3b 0d 0a 20 20 54 3a | 20 54 46 69 6c 65 54 69 |e;.. T:| TFileTi| |000029a0| 6d 65 3b 0d 0a 62 65 67 | 69 6e 0d 0a 20 20 75 43 |me;..beg|in.. uC| |000029b0| 76 74 53 65 74 46 69 6c | 65 54 69 6d 65 28 41 54 |vtSetFil|eTime(AT| |000029c0| 2c 20 54 2e 64 77 4c 6f | 77 44 61 74 65 54 69 6d |, T.dwLo|wDateTim| |000029d0| 65 2c 20 54 2e 64 77 48 | 69 67 68 44 61 74 65 54 |e, T.dwH|ighDateT| |000029e0| 69 6d 65 29 3b 0d 0a 20 | 20 69 66 20 46 69 6c 65 |ime);.. | if File| |000029f0| 54 69 6d 65 54 6f 53 79 | 73 74 65 6d 54 69 6d 65 |TimeToSy|stemTime| |00002a00| 28 54 2c 20 44 29 20 74 | 68 65 6e 0d 0a 20 20 52 |(T, D) t|hen.. R| |00002a10| 65 73 75 6c 74 20 3a 3d | 0d 0a 20 20 77 6b 64 61 |esult :=|.. wkda| |00002a20| 79 5b 44 2e 77 44 61 79 | 4f 66 57 65 65 6b 5d 20 |y[D.wDay|OfWeek] | |00002a30| 2b 20 27 2c 20 27 20 2b | 0d 0a 20 20 49 74 6f 53 |+ ', ' +|.. ItoS| |00002a40| 7a 28 44 2e 77 44 61 79 | 2c 20 32 29 20 2b 20 27 |z(D.wDay|, 2) + '| |00002a50| 20 27 20 2b 0d 0a 20 20 | 4d 6f 6e 74 68 45 28 44 | ' +.. |MonthE(D| |00002a60| 2e 77 4d 6f 6e 74 68 29 | 20 2b 20 27 20 27 20 2b |.wMonth)| + ' ' +| |00002a70| 0d 0a 20 20 49 74 6f 53 | 28 44 2e 77 59 65 61 72 |.. ItoS|(D.wYear| |00002a80| 29 20 2b 20 27 20 27 20 | 2b 0d 0a 20 20 49 74 6f |) + ' ' |+.. Ito| |00002a90| 53 7a 28 44 2e 77 48 6f | 75 72 2c 20 32 29 20 2b |Sz(D.wHo|ur, 2) +| |00002aa0| 20 27 3a 27 20 2b 0d 0a | 20 20 49 74 6f 53 7a 28 | ':' +..| ItoSz(| |00002ab0| 44 2e 77 4d 69 6e 75 74 | 65 2c 20 32 29 20 2b 20 |D.wMinut|e, 2) + | |00002ac0| 27 3a 27 20 2b 0d 0a 20 | 20 49 74 6f 53 7a 28 44 |':' +.. | ItoSz(D| |00002ad0| 2e 77 53 65 63 6f 6e 64 | 2c 20 32 29 20 2b 20 27 |.wSecond|, 2) + '| |00002ae0| 20 47 4d 54 27 3b 0d 0a | 65 6e 64 3b 0d 0a 0d 0a | GMT';..|end;....| |00002af0| 66 75 6e 63 74 69 6f 6e | 20 53 74 72 54 6f 46 69 |function| StrToFi| |00002b00| 6c 65 54 69 6d 65 28 41 | 53 74 72 3a 20 73 74 72 |leTime(A|Str: str| |00002b10| 69 6e 67 29 3a 20 44 57 | 4f 52 44 3b 0d 0a 76 61 |ing): DW|ORD;..va| |00002b20| 72 0d 0a 20 20 44 3a 20 | 54 53 79 73 74 65 6d 54 |r.. D: |TSystemT| |00002b30| 69 6d 65 3b 0d 0a 20 20 | 54 3a 20 54 46 69 6c 65 |ime;.. |T: TFile| |00002b40| 54 69 6d 65 3b 0d 0a 20 | 20 73 2c 20 7a 3a 20 73 |Time;.. | s, z: s| |00002b50| 74 72 69 6e 67 3b 0d 0a | 20 20 65 3a 20 49 6e 74 |tring;..| e: Int| |00002b60| 65 67 65 72 3b 0d 0a 62 | 65 67 69 6e 0d 0a 20 20 |eger;..b|egin.. | |00002b70| 52 65 73 75 6c 74 20 3a | 3d 20 49 4e 56 41 4c 49 |Result :|= INVALI| |00002b80| 44 5f 46 49 4c 45 5f 54 | 49 4d 45 3b 0d 0a 20 20 |D_FILE_T|IME;.. | |00002b90| 43 6c 65 61 72 28 44 2c | 20 53 69 7a 65 4f 66 28 |Clear(D,| SizeOf(| |00002ba0| 44 29 29 3b 0d 0a 20 20 | 73 20 3a 3d 20 41 53 74 |D));.. |s := ASt| |00002bb0| 72 3b 0d 0a 20 20 47 65 | 74 57 72 64 28 73 2c 20 |r;.. Ge|tWrd(s, | |00002bc0| 7a 2c 20 27 20 27 29 3b | 0d 0a 20 20 47 65 74 57 |z, ' ');|.. GetW| |00002bd0| 72 64 44 28 73 2c 20 7a | 29 3b 20 56 61 6c 28 7a |rdD(s, z|); Val(z| |00002be0| 2c 20 44 2e 77 44 61 79 | 2c 20 65 29 3b 20 69 66 |, D.wDay|, e); if| |00002bf0| 20 65 20 3e 20 30 20 74 | 68 65 6e 20 45 78 69 74 | e > 0 t|hen Exit| |00002c00| 3b 0d 0a 20 20 47 65 74 | 57 72 64 41 28 73 2c 20 |;.. Get|WrdA(s, | |00002c10| 7a 29 3b 20 44 2e 77 4d | 6f 6e 74 68 20 3a 3d 20 |z); D.wM|onth := | |00002c20| 50 6f 73 28 23 31 2b 55 | 70 70 65 72 43 61 73 65 |Pos(#1+U|pperCase| |00002c30| 28 7a 29 2b 23 31 2c 20 | 23 31 27 4a 41 4e 27 23 |(z)+#1, |#1'JAN'#| |00002c40| 31 27 46 45 42 27 23 31 | 27 4d 41 52 27 23 31 27 |1'FEB'#1|'MAR'#1'| |00002c50| 41 50 52 27 23 31 27 4d | 41 59 27 23 31 27 4a 55 |APR'#1'M|AY'#1'JU| |00002c60| 4e 27 23 31 27 4a 55 4c | 27 23 31 27 41 55 47 27 |N'#1'JUL|'#1'AUG'| |00002c70| 23 31 27 53 45 50 27 23 | 31 27 4f 43 54 27 23 31 |#1'SEP'#|1'OCT'#1| |00002c80| 27 4e 4f 56 27 23 31 27 | 44 45 43 27 23 31 29 3b |'NOV'#1'|DEC'#1);| |00002c90| 0d 0a 20 20 69 66 20 44 | 2e 77 4d 6f 6e 74 68 20 |.. if D|.wMonth | |00002ca0| 3d 20 30 20 74 68 65 6e | 20 45 78 69 74 3b 0d 0a |= 0 then| Exit;..| |00002cb0| 20 20 44 2e 77 4d 6f 6e | 74 68 20 3a 3d 20 28 44 | D.wMon|th := (D| |00002cc0| 2e 77 4d 6f 6e 74 68 2b | 33 29 20 64 69 76 20 34 |.wMonth+|3) div 4| |00002cd0| 3b 0d 0a 20 20 47 65 74 | 57 72 64 44 28 73 2c 20 |;.. Get|WrdD(s, | |00002ce0| 7a 29 3b 20 56 61 6c 28 | 7a 2c 20 44 2e 77 59 65 |z); Val(|z, D.wYe| |00002cf0| 61 72 2c 20 65 29 3b 20 | 69 66 20 65 20 3e 20 30 |ar, e); |if e > 0| |00002d00| 20 74 68 65 6e 20 45 78 | 69 74 3b 0d 0a 20 20 69 | then Ex|it;.. i| |00002d10| 66 20 44 2e 77 59 65 61 | 72 20 3c 20 32 30 30 20 |f D.wYea|r < 200 | |00002d20| 74 68 65 6e 0d 0a 20 20 | 62 65 67 69 6e 0d 0a 20 |then.. |begin.. | |00002d30| 20 20 20 69 66 20 44 2e | 77 59 65 61 72 20 3c 20 | if D.|wYear < | |00002d40| 35 30 20 74 68 65 6e 20 | 49 6e 63 28 44 2e 77 59 |50 then |Inc(D.wY| |00002d50| 65 61 72 2c 20 32 30 30 | 30 29 20 65 6c 73 65 20 |ear, 200|0) else | |00002d60| 49 6e 63 28 44 2e 77 59 | 65 61 72 2c 20 31 39 30 |Inc(D.wY|ear, 190| |00002d70| 30 29 3b 0d 0a 20 20 65 | 6e 64 3b 0d 0a 20 20 47 |0);.. e|nd;.. G| |00002d80| 65 74 57 72 64 44 28 73 | 2c 20 7a 29 3b 20 56 61 |etWrdD(s|, z); Va| |00002d90| 6c 28 7a 2c 20 44 2e 77 | 48 6f 75 72 2c 20 65 29 |l(z, D.w|Hour, e)| |00002da0| 3b 20 69 66 20 65 20 3e | 20 30 20 74 68 65 6e 20 |; if e >| 0 then | |00002db0| 45 78 69 74 3b 0d 0a 20 | 20 47 65 74 57 72 64 44 |Exit;.. | GetWrdD| |00002dc0| 28 73 2c 20 7a 29 3b 20 | 56 61 6c 28 7a 2c 20 44 |(s, z); |Val(z, D| |00002dd0| 2e 77 4d 69 6e 75 74 65 | 2c 20 65 29 3b 20 69 66 |.wMinute|, e); if| |00002de0| 20 65 20 3e 20 30 20 74 | 68 65 6e 20 45 78 69 74 | e > 0 t|hen Exit| |00002df0| 3b 0d 0a 20 20 47 65 74 | 57 72 64 44 28 73 2c 20 |;.. Get|WrdD(s, | |00002e00| 7a 29 3b 20 56 61 6c 28 | 7a 2c 20 44 2e 77 53 65 |z); Val(|z, D.wSe| |00002e10| 63 6f 6e 64 2c 20 65 29 | 3b 20 69 66 20 65 20 3e |cond, e)|; if e >| |00002e20| 20 30 20 74 68 65 6e 20 | 45 78 69 74 3b 0d 0a 20 | 0 then |Exit;.. | |00002e30| 20 69 66 20 6e 6f 74 20 | 53 79 73 74 65 6d 54 69 | if not |SystemTi| |00002e40| 6d 65 54 6f 46 69 6c 65 | 54 69 6d 65 28 44 2c 20 |meToFile|Time(D, | |00002e50| 54 29 20 74 68 65 6e 20 | 45 78 69 74 3b 0d 0a 20 |T) then |Exit;.. | |00002e60| 20 52 65 73 75 6c 74 20 | 3a 3d 20 75 43 76 74 47 | Result |:= uCvtG| |00002e70| 65 74 46 69 6c 65 54 69 | 6d 65 28 54 2e 64 77 4c |etFileTi|me(T.dwL| |00002e80| 6f 77 44 61 74 65 54 69 | 6d 65 2c 20 54 2e 64 77 |owDateTi|me, T.dw| |00002e90| 48 69 67 68 44 61 74 65 | 54 69 6d 65 29 3b 0d 0a |HighDate|Time);..| |00002ea0| 65 6e 64 3b 0d 0a 0d 0a | 2f 2f 20 27 53 75 6e 64 |end;....|// 'Sund| |00002eb0| 61 79 2c 20 31 37 2d 4d | 61 79 2d 39 38 20 31 38 |ay, 17-M|ay-98 18| |00002ec0| 3a 34 34 3a 32 33 20 47 | 4d 54 3b 20 6c 65 6e 67 |:44:23 G|MT; leng| |00002ed0| 74 68 3d 34 39 35 36 27 | 0d 0a 0d 0a 63 6f 6e 73 |th=4956'|....cons| |00002ee0| 74 72 75 63 74 6f 72 20 | 54 48 54 54 50 53 65 72 |tructor |THTTPSer| |00002ef0| 76 65 72 54 68 72 65 61 | 64 2e 43 72 65 61 74 65 |verThrea|d.Create| |00002f00| 3b 0d 0a 62 65 67 69 6e | 0d 0a 20 20 69 6e 68 65 |;..begin|.. inhe| |00002f10| 72 69 74 65 64 20 43 72 | 65 61 74 65 28 54 72 75 |rited Cr|eate(Tru| |00002f20| 65 29 3b 0d 0a 65 6e 64 | 3b 0d 0a 0d 0a 64 65 73 |e);..end|;....des| |00002f30| 74 72 75 63 74 6f 72 20 | 54 48 54 54 50 53 65 72 |tructor |THTTPSer| |00002f40| 76 65 72 54 68 72 65 61 | 64 2e 44 65 73 74 72 6f |verThrea|d.Destro| |00002f50| 79 3b 0d 0a 62 65 67 69 | 6e 0d 0a 20 20 46 72 65 |y;..begi|n.. Fre| |00002f60| 65 4f 62 6a 65 63 74 28 | 53 6f 63 6b 65 74 29 3b |eObject(|Socket);| |00002f70| 0d 0a 20 20 69 6e 68 65 | 72 69 74 65 64 20 44 65 |.. inhe|rited De| |00002f80| 73 74 72 6f 79 3b 0d 0a | 65 6e 64 3b 0d 0a 0d 0a |stroy;..|end;....| |00002f90| 66 75 6e 63 74 69 6f 6e | 20 54 47 65 6e 65 72 61 |function| TGenera| |00002fa0| 6c 48 65 61 64 65 72 2e | 46 69 6c 74 65 72 28 63 |lHeader.|Filter(c| |00002fb0| 6f 6e 73 74 20 7a 2c 20 | 73 3a 20 73 74 72 69 6e |onst z, |s: strin| |00002fc0| 67 29 3a 20 42 6f 6f 6c | 65 61 6e 3b 0d 0a 62 65 |g): Bool|ean;..be| |00002fd0| 67 69 6e 0d 0a 20 20 52 | 65 73 75 6c 74 20 3a 3d |gin.. R|esult :=| |00002fe0| 20 54 72 75 65 3b 0d 0a | 20 20 69 66 20 7a 20 3d | True;..| if z =| |00002ff0| 20 27 43 41 43 48 45 2d | 43 4f 4e 54 52 4f 4c 27 | 'CACHE-|CONTROL'| |00003000| 20 20 20 20 20 20 20 74 | 68 65 6e 20 43 61 63 68 | t|hen Cach| |00003010| 65 43 6f 6e 74 72 6f 6c | 20 20 20 20 20 20 20 3a |eControl| :| |00003020| 3d 20 73 20 65 6c 73 65 | 20 2f 2f 20 53 65 63 74 |= s else| // Sect| |00003030| 69 6f 6e 20 31 34 2e 39 | 0d 0a 20 20 69 66 20 7a |ion 14.9|.. if z| |00003040| 20 3d 20 27 43 4f 4e 4e | 45 43 54 49 4f 4e 27 20 | = 'CONN|ECTION' | |00003050| 20 20 20 20 20 20 20 20 | 20 74 68 65 6e 20 43 6f | | then Co| |00003060| 6e 6e 65 63 74 69 6f 6e | 20 20 20 20 20 20 20 20 |nnection| | |00003070| 20 3a 3d 20 73 20 65 6c | 73 65 20 2f 2f 20 53 65 | := s el|se // Se| |00003080| 63 74 69 6f 6e 20 31 34 | 2e 31 30 0d 0a 20 20 69 |ction 14|.10.. i| |00003090| 66 20 7a 20 3d 20 27 44 | 41 54 45 27 20 20 20 20 |f z = 'D|ATE' | |000030a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 74 68 65 6e | | then| |000030b0| 20 44 61 74 65 20 20 20 | 20 20 20 20 20 20 20 20 | Date | | |000030c0| 20 20 20 20 3a 3d 20 73 | 20 65 6c 73 65 20 2f 2f | := s| else //| |000030d0| 20 53 65 63 74 69 6f 6e | 20 31 34 2e 31 39 0d 0a | Section| 14.19..| |000030e0| 20 20 69 66 20 7a 20 3d | 20 27 50 52 41 47 4d 41 | if z =| 'PRAGMA| |000030f0| 27 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 74 |' | t| |00003100| 68 65 6e 20 50 72 61 67 | 6d 61 20 20 20 20 20 20 |hen Prag|ma | |00003110| 20 20 20 20 20 20 20 3a | 3d 20 73 20 65 6c 73 65 | :|= s else| |00003120| 20 2f 2f 20 53 65 63 74 | 69 6f 6e 20 31 34 2e 33 | // Sect|ion 14.3| |00003130| 32 0d 0a 20 20 69 66 20 | 7a 20 3d 20 27 54 52 41 |2.. if |z = 'TRA| |00003140| 4e 53 46 45 52 2d 45 4e | 43 4f 44 49 4e 47 27 20 |NSFER-EN|CODING' | |00003150| 20 20 74 68 65 6e 20 54 | 72 61 6e 73 66 65 72 45 | then T|ransferE| |00003160| 6e 63 6f 64 69 6e 67 20 | 20 20 3a 3d 20 73 20 65 |ncoding | := s e| |00003170| 6c 73 65 20 2f 2f 20 53 | 65 63 74 69 6f 6e 20 31 |lse // S|ection 1| |00003180| 34 2e 34 30 0d 0a 20 20 | 69 66 20 7a 20 3d 20 27 |4.40.. |if z = '| |00003190| 55 50 47 52 41 44 45 27 | 20 20 20 20 20 20 20 20 |UPGRADE'| | |000031a0| 20 20 20 20 20 74 68 65 | 6e 20 55 70 67 72 61 64 | the|n Upgrad| |000031b0| 65 20 20 20 20 20 20 20 | 20 20 20 20 20 3a 3d 20 |e | := | |000031c0| 73 20 65 6c 73 65 20 2f | 2f 20 53 65 63 74 69 6f |s else /|/ Sectio| |000031d0| 6e 20 31 34 2e 34 31 0d | 0a 20 20 69 66 20 7a 20 |n 14.41.|. if z | |000031e0| 3d 20 27 56 49 41 27 20 | 20 20 20 20 20 20 20 20 |= 'VIA' | | |000031f0| 20 20 20 20 20 20 20 20 | 74 68 65 6e 20 56 69 61 | |then Via| |00003200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003210| 3a 3d 20 73 20 65 6c 73 | 65 20 2f 2f 20 53 65 63 |:= s els|e // Sec| |00003220| 74 69 6f 6e 20 31 34 2e | 34 34 0d 0a 20 20 20 20 |tion 14.|44.. | |00003230| 52 65 73 75 6c 74 20 3a | 3d 20 46 61 6c 73 65 3b |Result :|= False;| |00003240| 0d 0a 65 6e 64 3b 0d 0a | 0d 0a 66 75 6e 63 74 69 |..end;..|..functi| |00003250| 6f 6e 20 54 52 65 71 75 | 65 73 74 48 65 61 64 65 |on TRequ|estHeade| |00003260| 72 2e 46 69 6c 74 65 72 | 28 63 6f 6e 73 74 20 7a |r.Filter|(const z| |00003270| 2c 20 73 3a 20 73 74 72 | 69 6e 67 29 3a 20 42 6f |, s: str|ing): Bo| |00003280| 6f 6c 65 61 6e 3b 0d 0a | 62 65 67 69 6e 0d 0a 20 |olean;..|begin.. | |00003290| 20 52 65 73 75 6c 74 20 | 3a 3d 20 54 72 75 65 3b | Result |:= True;| |000032a0| 0d 0a 20 20 69 66 20 7a | 20 3d 20 27 41 43 43 45 |.. if z| = 'ACCE| |000032b0| 50 54 27 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |PT' | | |000032c0| 20 74 68 65 6e 20 41 63 | 63 65 70 74 20 20 20 20 | then Ac|cept | |000032d0| 20 20 20 20 20 20 20 20 | 20 3a 3d 20 73 20 65 6c | | := s el| |000032e0| 73 65 20 2f 2f 20 53 65 | 63 74 69 6f 6e 20 31 34 |se // Se|ction 14| |000032f0| 2e 31 0d 0a 20 20 69 66 | 20 7a 20 3d 20 27 41 43 |.1.. if| z = 'AC| |00003300| 43 45 50 54 2d 43 48 41 | 52 53 45 54 27 20 20 20 |CEPT-CHA|RSET' | |00003310| 20 20 20 74 68 65 6e 20 | 41 63 63 65 70 74 43 68 | then |AcceptCh| |00003320| 61 72 73 65 74 20 20 20 | 20 20 20 3a 3d 20 73 20 |arset | := s | |00003330| 65 6c 73 65 20 2f 2f 20 | 53 65 63 74 69 6f 6e 20 |else // |Section | |00003340| 31 34 2e 32 0d 0a 20 20 | 69 66 20 7a 20 3d 20 27 |14.2.. |if z = '| |00003350| 41 43 43 45 50 54 2d 45 | 4e 43 4f 44 49 4e 47 27 |ACCEPT-E|NCODING'| |00003360| 20 20 20 20 20 74 68 65 | 6e 20 41 63 63 65 70 74 | the|n Accept| |00003370| 45 6e 63 6f 64 69 6e 67 | 20 20 20 20 20 3a 3d 20 |Encoding| := | |00003380| 73 20 65 6c 73 65 20 2f | 2f 20 53 65 63 74 69 6f |s else /|/ Sectio| |00003390| 6e 20 31 34 2e 33 0d 0a | 20 20 69 66 20 7a 20 3d |n 14.3..| if z =| |000033a0| 20 27 41 43 43 45 50 54 | 2d 4c 41 4e 47 55 41 47 | 'ACCEPT|-LANGUAG| |000033b0| 45 27 20 20 20 20 20 74 | 68 65 6e 20 41 63 63 65 |E' t|hen Acce| |000033c0| 70 74 4c 61 6e 67 75 61 | 67 65 20 20 20 20 20 3a |ptLangua|ge :| |000033d0| 3d 20 73 20 65 6c 73 65 | 20 2f 2f 20 53 65 63 74 |= s else| // Sect| |000033e0| 69 6f 6e 20 31 34 2e 34 | 0d 0a 20 20 69 66 20 7a |ion 14.4|.. if z| |000033f0| 20 3d 20 27 41 55 54 48 | 4f 52 49 5a 41 54 49 4f | = 'AUTH|ORIZATIO| |00003400| 4e 27 20 20 20 20 20 20 | 20 74 68 65 6e 20 41 75 |N' | then Au| |00003410| 74 68 6f 72 69 7a 61 74 | 69 6f 6e 20 20 20 20 20 |thorizat|ion | |00003420| 20 3a 3d 20 73 20 65 6c | 73 65 20 2f 2f 20 53 65 | := s el|se // Se| |00003430| 63 74 69 6f 6e 20 31 34 | 2e 38 0d 0a 20 20 69 66 |ction 14|.8.. if| |00003440| 20 7a 20 3d 20 27 46 52 | 4f 4d 27 20 20 20 20 20 | z = 'FR|OM' | |00003450| 20 20 20 20 20 20 20 20 | 20 20 20 74 68 65 6e 20 | | then | |00003460| 46 72 6f 6d 20 20 20 20 | 20 20 20 20 20 20 20 20 |From | | |00003470| 20 20 20 3a 3d 20 73 20 | 65 6c 73 65 20 2f 2f 20 | := s |else // | |00003480| 53 65 63 74 69 6f 6e 20 | 31 34 2e 32 32 0d 0a 20 |Section |14.22.. | |00003490| 20 69 66 20 7a 20 3d 20 | 27 48 4f 53 54 27 20 20 | if z = |'HOST' | |000034a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 74 68 | | th| |000034b0| 65 6e 20 48 6f 73 74 20 | 20 20 20 20 20 20 20 20 |en Host | | |000034c0| 20 20 20 20 20 20 3a 3d | 20 73 20 65 6c 73 65 20 | :=| s else | |000034d0| 2f 2f 20 53 65 63 74 69 | 6f 6e 20 31 34 2e 32 33 |// Secti|on 14.23| |000034e0| 0d 0a 20 20 69 66 20 7a | 20 3d 20 27 49 46 2d 4d |.. if z| = 'IF-M| |000034f0| 4f 44 49 46 49 45 44 2d | 53 49 4e 43 45 27 20 20 |ODIFIED-|SINCE' | |00003500| 20 74 68 65 6e 20 49 66 | 4d 6f 64 69 66 69 65 64 | then If|Modified| |00003510| 53 69 6e 63 65 20 20 20 | 20 3a 3d 20 73 20 65 6c |Since | := s el| |00003520| 73 65 20 2f 2f 20 53 65 | 63 74 69 6f 6e 20 31 34 |se // Se|ction 14| |00003530| 2e 32 34 0d 0a 20 20 69 | 66 20 7a 20 3d 20 27 49 |.24.. i|f z = 'I| |00003540| 46 2d 4d 41 54 43 48 27 | 20 20 20 20 20 20 20 20 |F-MATCH'| | |00003550| 20 20 20 20 74 68 65 6e | 20 49 66 4d 61 74 63 68 | then| IfMatch| |00003560| 20 20 20 20 20 20 20 20 | 20 20 20 20 3a 3d 20 73 | | := s| |00003570| 20 65 6c 73 65 20 2f 2f | 20 53 65 63 74 69 6f 6e | else //| Section| |00003580| 20 31 34 2e 32 35 0d 0a | 20 20 69 66 20 7a 20 3d | 14.25..| if z =| |00003590| 20 27 49 46 2d 4e 4f 4e | 45 2d 4d 41 54 43 48 27 | 'IF-NON|E-MATCH'| |000035a0| 20 20 20 20 20 20 20 74 | 68 65 6e 20 49 66 4e 6f | t|hen IfNo| |000035b0| 6e 65 4d 61 74 63 68 20 | 20 20 20 20 20 20 20 3a |neMatch | :| |000035c0| 3d 20 73 20 65 6c 73 65 | 20 2f 2f 20 53 65 63 74 |= s else| // Sect| |000035d0| 69 6f 6e 20 31 34 2e 32 | 36 0d 0a 20 20 69 66 20 |ion 14.2|6.. if | |000035e0| 7a 20 3d 20 27 49 46 2d | 52 41 4e 47 45 27 20 20 |z = 'IF-|RANGE' | |000035f0| 20 20 20 20 20 20 20 20 | 20 20 74 68 65 6e 20 49 | | then I| |00003600| 66 52 61 6e 67 65 20 20 | 20 20 20 20 20 20 20 20 |fRange | | |00003610| 20 20 3a 3d 20 73 20 65 | 6c 73 65 20 2f 2f 20 53 | := s e|lse // S| |00003620| 65 63 74 69 6f 6e 20 31 | 34 2e 32 37 0d 0a 20 20 |ection 1|4.27.. | |00003630| 69 66 20 7a 20 3d 20 27 | 49 46 2d 55 4e 4d 4f 44 |if z = '|IF-UNMOD| |00003640| 49 46 49 45 44 2d 53 49 | 4e 43 45 27 20 74 68 65 |IFIED-SI|NCE' the| |00003650| 6e 20 49 66 55 6e 6d 6f | 64 69 66 69 65 64 53 69 |n IfUnmo|difiedSi| |00003660| 6e 63 65 20 20 3a 3d 20 | 73 20 65 6c 73 65 20 2f |nce := |s else /| |00003670| 2f 20 53 65 63 74 69 6f | 6e 20 31 34 2e 32 38 0d |/ Sectio|n 14.28.| |00003680| 0a 20 20 69 66 20 7a 20 | 3d 20 27 4d 41 58 2d 46 |. if z |= 'MAX-F| |00003690| 4f 52 57 41 52 44 53 27 | 20 20 20 20 20 20 20 20 |ORWARDS'| | |000036a0| 74 68 65 6e 20 4d 61 78 | 46 6f 72 77 61 72 64 73 |then Max|Forwards| |000036b0| 20 20 20 20 20 20 20 20 | 3a 3d 20 73 20 65 6c 73 | |:= s els| |000036c0| 65 20 2f 2f 20 53 65 63 | 74 69 6f 6e 20 31 34 2e |e // Sec|tion 14.| |000036d0| 33 31 0d 0a 20 20 69 66 | 20 7a 20 3d 20 27 50 52 |31.. if| z = 'PR| |000036e0| 4f 58 59 2d 41 55 54 48 | 4f 52 49 5a 41 54 49 4f |OXY-AUTH|ORIZATIO| |000036f0| 4e 27 20 74 68 65 6e 20 | 50 72 6f 78 79 41 75 74 |N' then |ProxyAut| |00003700| 68 6f 72 69 7a 61 74 69 | 6f 6e 20 3a 3d 20 73 20 |horizati|on := s | |00003710| 65 6c 73 65 20 2f 2f 20 | 53 65 63 74 69 6f 6e 20 |else // |Section | |00003720| 31 34 2e 33 34 0d 0a 20 | 20 69 66 20 7a 20 3d 20 |14.34.. | if z = | |00003730| 27 52 41 4e 47 45 27 20 | 20 20 20 20 20 20 20 20 |'RANGE' | | |00003740| 20 20 20 20 20 20 74 68 | 65 6e 20 52 61 6e 67 65 | th|en Range| |00003750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3a 3d | | :=| |00003760| 20 73 20 65 6c 73 65 20 | 2f 2f 20 53 65 63 74 69 | s else |// Secti| |00003770| 6f 6e 20 31 34 2e 33 36 | 0d 0a 20 20 69 66 20 7a |on 14.36|.. if z| |00003780| 20 3d 20 27 52 45 46 45 | 52 45 52 27 20 20 20 20 | = 'REFE|RER' | |00003790| 20 20 20 20 20 20 20 20 | 20 74 68 65 6e 20 52 65 | | then Re| |000037a0| 66 65 72 65 72 20 20 20 | 20 20 20 20 20 20 20 20 |ferer | | |000037b0| 20 3a 3d 20 73 20 65 6c | 73 65 20 2f 2f 20 53 65 | := s el|se // Se| |000037c0| 63 74 69 6f 6e 20 31 34 | 2e 33 37 0d 0a 20 20 69 |ction 14|.37.. i| |000037d0| 66 20 7a 20 3d 20 27 55 | 53 45 52 2d 41 47 45 4e |f z = 'U|SER-AGEN| |000037e0| 54 27 20 20 20 20 20 20 | 20 20 20 20 74 68 65 6e |T' | then| |000037f0| 20 55 73 65 72 41 67 65 | 6e 74 20 20 20 20 20 20 | UserAge|nt | |00003800| 20 20 20 20 3a 3d 20 73 | 20 65 6c 73 65 20 2f 2f | := s| else //| |00003810| 20 53 65 63 74 69 6f 6e | 20 31 34 2e 34 32 0d 0a | Section| 14.42..| |00003820| 20 20 69 66 20 7a 20 3d | 20 27 43 4f 4f 4b 49 45 | if z =| 'COOKIE| |00003830| 27 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 74 |' | t| |00003840| 68 65 6e 20 43 6f 6f 6b | 69 65 20 20 20 20 20 20 |hen Cook|ie | |00003850| 20 20 20 20 20 20 20 3a | 3d 20 73 20 65 6c 73 65 | :|= s else| |00003860| 0d 0a 20 20 20 20 52 65 | 73 75 6c 74 20 3a 3d 20 |.. Re|sult := | |00003870| 46 61 6c 73 65 0d 0a 65 | 6e 64 3b 0d 0a 0d 0a 70 |False..e|nd;....p| |00003880| 72 6f 63 65 64 75 72 65 | 20 41 64 64 28 76 61 72 |rocedure| Add(var| |00003890| 20 73 2c 20 7a 3a 20 73 | 74 72 69 6e 67 3b 20 63 | s, z: s|tring; c| |000038a0| 6f 6e 73 74 20 61 3a 20 | 73 74 72 69 6e 67 29 3b |onst a: |string);| |000038b0| 0d 0a 62 65 67 69 6e 0d | 0a 20 20 69 66 20 7a 20 |..begin.|. if z | |000038c0| 3c 3e 20 27 27 20 74 68 | 65 6e 20 73 20 3a 3d 20 |<> '' th|en s := | |000038d0| 73 20 2b 20 61 20 2b 20 | 27 3a 20 27 2b 7a 2b 23 |s + a + |': '+z+#| |000038e0| 31 33 23 31 30 3b 0d 0a | 65 6e 64 3b 0d 0a 0d 0a |13#10;..|end;....| |000038f0| 66 75 6e 63 74 69 6f 6e | 20 54 52 65 73 70 6f 6e |function| TRespon| |00003900| 73 65 48 65 61 64 65 72 | 2e 4f 75 74 53 74 72 69 |seHeader|.OutStri| |00003910| 6e 67 3a 20 73 74 72 69 | 6e 67 3b 0d 0a 76 61 72 |ng: stri|ng;..var| |00003920| 0d 0a 20 20 73 3a 20 73 | 74 72 69 6e 67 3b 0d 0a |.. s: s|tring;..| |00003930| 62 65 67 69 6e 0d 0a 20 | 20 73 20 3a 3d 20 27 27 |begin.. | s := ''| |00003940| 3b 0d 0a 20 20 41 64 64 | 28 73 2c 20 41 67 65 2c |;.. Add|(s, Age,| |00003950| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 27 | | '| |00003960| 41 67 65 27 29 3b 20 20 | 20 20 20 20 20 20 20 20 |Age'); | | |00003970| 20 20 20 20 20 20 2f 2f | 20 53 65 63 74 69 6f 6e | //| Section| |00003980| 20 31 34 2e 36 0d 0a 20 | 20 41 64 64 28 73 2c 20 | 14.6.. | Add(s, | |00003990| 4c 6f 63 61 74 69 6f 6e | 2c 20 20 20 20 20 20 20 |Location|, | |000039a0| 20 20 20 27 4c 6f 63 61 | 74 69 6f 6e 27 29 3b 20 | 'Loca|tion'); | |000039b0| 20 20 20 20 20 20 20 20 | 20 20 2f 2f 20 53 65 63 | | // Sec| |000039c0| 74 69 6f 6e 20 31 34 2e | 33 30 0d 0a 20 20 41 64 |tion 14.|30.. Ad| |000039d0| 64 28 73 2c 20 50 72 6f | 78 79 41 75 74 68 65 6e |d(s, Pro|xyAuthen| |000039e0| 74 69 63 61 74 65 2c 20 | 27 50 72 6f 78 79 2d 41 |ticate, |'Proxy-A| |000039f0| 75 74 68 65 6e 74 69 63 | 61 74 65 27 29 3b 20 2f |uthentic|ate'); /| |00003a00| 2f 20 53 65 63 74 69 6f | 6e 20 31 34 2e 33 33 0d |/ Sectio|n 14.33.| |00003a10| 0a 20 20 41 64 64 28 73 | 2c 20 50 75 62 6c 69 63 |. Add(s|, Public| |00003a20| 5f 2c 20 20 20 20 20 20 | 20 20 20 20 20 27 50 75 |_, | 'Pu| |00003a30| 62 6c 69 63 27 29 3b 20 | 20 20 20 20 20 20 20 20 |blic'); | | |00003a40| 20 20 20 20 2f 2f 20 53 | 65 63 74 69 6f 6e 20 31 | // S|ection 1| |00003a50| 34 2e 33 35 0d 0a 20 20 | 41 64 64 28 73 2c 20 52 |4.35.. |Add(s, R| |00003a60| 65 74 72 79 41 66 74 65 | 72 2c 20 20 20 20 20 20 |etryAfte|r, | |00003a70| 20 20 27 52 65 74 72 79 | 2d 41 66 74 65 72 27 29 | 'Retry|-After')| |00003a80| 3b 20 20 20 20 20 20 20 | 20 2f 2f 20 53 65 63 74 |; | // Sect| |00003a90| 69 6f 6e 20 31 34 2e 33 | 38 0d 0a 20 20 41 64 64 |ion 14.3|8.. Add| |00003aa0| 28 73 2c 20 53 65 72 76 | 65 72 2c 20 20 20 20 20 |(s, Serv|er, | |00003ab0| 20 20 20 20 20 20 20 27 | 53 65 72 76 65 72 27 29 | '|Server')| |00003ac0| 3b 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2f |; | //| |00003ad0| 20 53 65 63 74 69 6f 6e | 20 31 34 2e 33 39 0d 0a | Section| 14.39..| |00003ae0| 20 20 41 64 64 28 73 2c | 20 56 61 72 79 2c 20 20 | Add(s,| Vary, | |00003af0| 20 20 20 20 20 20 20 20 | 20 20 20 20 27 56 61 72 | | 'Var| |00003b00| 79 27 29 3b 20 20 20 20 | 20 20 20 20 20 20 20 20 |y'); | | |00003b10| 20 20 20 2f 2f 20 53 65 | 63 74 69 6f 6e 20 31 34 | // Se|ction 14| |00003b20| 2e 34 33 0d 0a 20 20 41 | 64 64 28 73 2c 20 57 61 |.43.. A|dd(s, Wa| |00003b30| 72 6e 69 6e 67 2c 20 20 | 20 20 20 20 20 20 20 20 |rning, | | |00003b40| 20 27 57 61 72 6e 69 6e | 67 27 29 3b 20 20 20 20 | 'Warnin|g'); | |00003b50| 20 20 20 20 20 20 20 20 | 2f 2f 20 53 65 63 74 69 | |// Secti| |00003b60| 6f 6e 20 31 34 2e 34 35 | 0d 0a 20 20 41 64 64 28 |on 14.45|.. Add(| |00003b70| 73 2c 20 57 57 57 41 75 | 74 68 65 6e 74 69 63 61 |s, WWWAu|thentica| |00003b80| 74 65 2c 20 20 20 27 57 | 57 57 2d 41 75 74 68 65 |te, 'W|WW-Authe| |00003b90| 6e 74 69 63 61 74 65 27 | 29 3b 20 20 20 2f 2f 20 |nticate'|); // | |00003ba0| 53 65 63 74 69 6f 6e 20 | 31 34 2e 34 36 0d 0a 20 |Section |14.46.. | |00003bb0| 20 52 65 73 75 6c 74 20 | 3a 3d 20 73 3b 0d 0a 65 | Result |:= s;..e| |00003bc0| 6e 64 3b 0d 0a 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |nd;....f|unction | |00003bd0| 54 45 6e 74 69 74 79 48 | 65 61 64 65 72 2e 4f 75 |TEntityH|eader.Ou| |00003be0| 74 53 74 72 69 6e 67 3a | 20 73 74 72 69 6e 67 3b |tString:| string;| |00003bf0| 0d 0a 76 61 72 0d 0a 20 | 20 73 3a 20 73 74 72 69 |..var.. | s: stri| |00003c00| 6e 67 3b 0d 0a 62 65 67 | 69 6e 0d 0a 20 20 73 20 |ng;..beg|in.. s | |00003c10| 3a 3d 20 27 27 3b 0d 0a | 20 20 41 64 64 28 73 2c |:= '';..| Add(s,| |00003c20| 20 41 6c 6c 6f 77 2c 20 | 20 20 20 20 20 20 20 20 | Allow, | | |00003c30| 20 20 27 41 6c 6c 6f 77 | 27 29 3b 20 20 20 20 20 | 'Allow|'); | |00003c40| 20 20 20 20 20 20 20 20 | 2f 2f 20 53 65 63 74 69 | |// Secti| |00003c50| 6f 6e 20 31 34 2e 37 0d | 0a 20 20 41 64 64 28 73 |on 14.7.|. Add(s| |00003c60| 2c 20 43 6f 6e 74 65 6e | 74 42 61 73 65 2c 20 20 |, Conten|tBase, | |00003c70| 20 20 20 27 43 6f 6e 74 | 65 6e 74 2d 42 61 73 65 | 'Cont|ent-Base| |00003c80| 27 29 3b 20 20 20 20 20 | 20 2f 2f 20 53 65 63 74 |'); | // Sect| |00003c90| 69 6f 6e 20 31 34 2e 31 | 31 0d 0a 20 20 41 64 64 |ion 14.1|1.. Add| |00003ca0| 28 73 2c 20 43 6f 6e 74 | 65 6e 74 45 6e 63 6f 64 |(s, Cont|entEncod| |00003cb0| 69 6e 67 2c 20 27 43 6f | 6e 74 65 6e 74 2d 45 6e |ing, 'Co|ntent-En| |00003cc0| 63 6f 64 69 6e 67 27 29 | 3b 20 20 2f 2f 20 53 65 |coding')|; // Se| |00003cd0| 63 74 69 6f 6e 20 31 34 | 2e 31 32 0d 0a 20 20 41 |ction 14|.12.. A| |00003ce0| 64 64 28 73 2c 20 43 6f | 6e 74 65 6e 74 4c 61 6e |dd(s, Co|ntentLan| |00003cf0| 67 75 61 67 65 2c 20 27 | 43 6f 6e 74 65 6e 74 2d |guage, '|Content-| |00003d00| 4c 61 6e 67 75 61 67 65 | 27 29 3b 20 20 2f 2f 20 |Language|'); // | |00003d10| 53 65 63 74 69 6f 6e 20 | 31 34 2e 31 33 0d 0a 20 |Section |14.13.. | |00003d20| 20 41 64 64 28 73 2c 20 | 43 6f 6e 74 65 6e 74 4c | Add(s, |ContentL| |00003d30| 65 6e 67 74 68 2c 20 20 | 20 27 43 6f 6e 74 65 6e |ength, | 'Conten| |00003d40| 74 2d 4c 65 6e 67 74 68 | 27 29 3b 20 20 20 20 2f |t-Length|'); /| |00003d50| 2f 20 53 65 63 74 69 6f | 6e 20 31 34 2e 31 34 0d |/ Sectio|n 14.14.| |00003d60| 0a 20 20 41 64 64 28 73 | 2c 20 43 6f 6e 74 65 6e |. Add(s|, Conten| |00003d70| 74 4c 6f 63 61 74 69 6f | 6e 2c 20 27 43 6f 6e 74 |tLocatio|n, 'Cont| |00003d80| 65 6e 74 2d 4c 6f 63 61 | 74 69 6f 6e 27 29 3b 20 |ent-Loca|tion'); | |00003d90| 20 2f 2f 20 53 65 63 74 | 69 6f 6e 20 31 34 2e 31 | // Sect|ion 14.1| |00003da0| 35 0d 0a 20 20 41 64 64 | 28 73 2c 20 43 6f 6e 74 |5.. Add|(s, Cont| |00003db0| 65 6e 74 4d 44 35 2c 20 | 20 20 20 20 20 27 43 6f |entMD5, | 'Co| |00003dc0| 6e 74 65 6e 74 2d 4d 44 | 35 27 29 3b 20 20 20 20 |ntent-MD|5'); | |00003dd0| 20 20 20 2f 2f 20 53 65 | 63 74 69 6f 6e 20 31 34 | // Se|ction 14| |00003de0| 2e 31 36 0d 0a 20 20 41 | 64 64 28 73 2c 20 43 6f |.16.. A|dd(s, Co| |00003df0| 6e 74 65 6e 74 52 61 6e | 67 65 2c 20 20 20 20 27 |ntentRan|ge, '| |00003e00| 43 6f 6e 74 65 6e 74 2d | 52 61 6e 67 65 27 29 3b |Content-|Range');| |00003e10| 20 20 20 20 20 2f 2f 20 | 53 65 63 74 69 6f 6e 20 | // |Section | |00003e20| 31 34 2e 31 37 0d 0a 20 | 20 41 64 64 28 73 2c 20 |14.17.. | Add(s, | |00003e30| 43 6f 6e 74 65 6e 74 54 | 79 70 65 2c 20 20 20 20 |ContentT|ype, | |00003e40| 20 27 43 6f 6e 74 65 6e | 74 2d 54 79 70 65 27 29 | 'Conten|t-Type')| |00003e50| 3b 20 20 20 20 20 20 2f | 2f 20 53 65 63 74 69 6f |; /|/ Sectio| |00003e60| 6e 20 31 34 2e 31 38 0d | 0a 20 20 41 64 64 28 73 |n 14.18.|. Add(s| |00003e70| 2c 20 45 54 61 67 2c 20 | 20 20 20 20 20 20 20 20 |, ETag, | | |00003e80| 20 20 20 27 45 54 61 67 | 27 29 3b 20 20 20 20 20 | 'ETag|'); | |00003e90| 20 20 20 20 20 20 20 20 | 20 2f 2f 20 53 65 63 74 | | // Sect| |00003ea0| 69 6f 6e 20 31 34 2e 32 | 30 0d 0a 20 20 41 64 64 |ion 14.2|0.. Add| |00003eb0| 28 73 2c 20 45 78 70 69 | 72 65 73 2c 20 20 20 20 |(s, Expi|res, | |00003ec0| 20 20 20 20 20 27 45 78 | 70 69 72 65 73 27 29 3b | 'Ex|pires');| |00003ed0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 53 65 | | // Se| |00003ee0| 63 74 69 6f 6e 20 31 34 | 2e 32 31 0d 0a 20 20 41 |ction 14|.21.. A| |00003ef0| 64 64 28 73 2c 20 4c 61 | 73 74 4d 6f 64 69 66 69 |dd(s, La|stModifi| |00003f00| 65 64 2c 20 20 20 20 27 | 4c 61 73 74 2d 4d 6f 64 |ed, '|Last-Mod| |00003f10| 69 66 69 65 64 27 29 3b | 20 20 20 20 20 2f 2f 20 |ified');| // | |00003f20| 53 65 63 74 69 6f 6e 20 | 31 34 2e 32 39 0d 0a 20 |Section |14.29.. | |00003f30| 20 7b 54 68 69 73 20 69 | 73 20 74 77 6f 20 68 65 | {This i|s two he| |00003f40| 61 64 65 72 73 20 66 6f | 72 20 66 69 6c 65 20 64 |aders fo|r file d| |00003f50| 6f 77 6e 6c 6f 61 64 20 | 62 79 20 43 47 49 7d 0d |ownload |by CGI}.| |00003f60| 0a 20 20 41 64 64 28 73 | 2c 20 41 63 63 65 70 74 |. Add(s|, Accept| |00003f70| 52 61 6e 67 65 73 2c 20 | 20 20 20 27 41 63 63 65 |Ranges, | 'Acce| |00003f80| 70 74 2d 52 61 6e 67 65 | 73 27 29 3b 20 20 20 20 |pt-Range|s'); | |00003f90| 2f 2f 20 53 65 63 74 69 | 6f 6e 20 31 34 2e 35 0d |// Secti|on 14.5.| |00003fa0| 0a 20 20 41 64 64 28 73 | 2c 20 43 6f 6e 74 65 6e |. Add(s|, Conten| |00003fb0| 74 44 69 73 70 6f 73 69 | 74 69 6f 6e 2c 20 27 43 |tDisposi|tion, 'C| |00003fc0| 6f 6e 74 65 6e 74 2d 44 | 69 73 70 6f 73 69 74 69 |ontent-D|ispositi| |00003fd0| 6f 6e 27 29 3b 20 2f 2f | 20 53 65 63 74 69 6f 6e |on'); //| Section| |00003fe0| 20 31 35 2e 31 30 0d 0a | 20 20 41 64 64 28 73 2c | 15.10..| Add(s,| |00003ff0| 20 53 65 74 43 6f 6f 6b | 69 65 2c 20 20 20 20 20 | SetCook|ie, | |00004000| 20 20 27 53 65 74 2d 43 | 6f 6f 6b 69 65 27 29 3b | 'Set-C|ookie');| |00004010| 0d 0a 20 20 52 65 73 75 | 6c 74 20 3a 3d 20 73 3b |.. Resu|lt := s;| |00004020| 0d 0a 65 6e 64 3b 0d 0a | 0d 0a 66 75 6e 63 74 69 |..end;..|..functi| |00004030| 6f 6e 20 54 47 65 6e 65 | 72 61 6c 48 65 61 64 65 |on TGene|ralHeade| |00004040| 72 2e 4f 75 74 53 74 72 | 69 6e 67 3a 20 73 74 72 |r.OutStr|ing: str| |00004050| 69 6e 67 3b 0d 0a 76 61 | 72 0d 0a 20 20 73 3a 20 |ing;..va|r.. s: | |00004060| 73 74 72 69 6e 67 3b 0d | 0a 62 65 67 69 6e 0d 0a |string;.|.begin..| |00004070| 20 20 73 20 3a 3d 20 27 | 27 3b 0d 0a 20 20 41 64 | s := '|';.. Ad| |00004080| 64 28 73 2c 20 43 61 63 | 68 65 43 6f 6e 74 72 6f |d(s, Cac|heContro| |00004090| 6c 2c 20 20 20 20 20 27 | 43 61 63 68 65 2d 43 6f |l, '|Cache-Co| |000040a0| 6e 74 72 6f 6c 27 29 3b | 20 20 20 20 20 2f 2f 20 |ntrol');| // | |000040b0| 53 65 63 74 69 6f 6e 20 | 31 34 2e 39 0d 0a 20 20 |Section |14.9.. | |000040c0| 41 64 64 28 73 2c 20 43 | 6f 6e 6e 65 63 74 69 6f |Add(s, C|onnectio| |000040d0| 6e 2c 20 20 20 20 20 20 | 20 27 43 6f 6e 6e 65 63 |n, | 'Connec| |000040e0| 74 69 6f 6e 27 29 3b 20 | 20 20 20 20 20 20 20 2f |tion'); | /| |000040f0| 2f 20 53 65 63 74 69 6f | 6e 20 31 34 2e 31 30 0d |/ Sectio|n 14.10.| |00004100| 0a 20 20 41 64 64 28 73 | 2c 20 44 61 74 65 2c 20 |. Add(s|, Date, | |00004110| 20 20 20 20 20 20 20 20 | 20 20 20 20 27 44 61 74 | | 'Dat| |00004120| 65 27 29 3b 20 20 20 20 | 20 20 20 20 20 20 20 20 |e'); | | |00004130| 20 20 2f 2f 20 53 65 63 | 74 69 6f 6e 20 31 34 2e | // Sec|tion 14.| |00004140| 31 39 0d 0a 20 20 41 64 | 64 28 73 2c 20 50 72 61 |19.. Ad|d(s, Pra| |00004150| 67 6d 61 2c 20 20 20 20 | 20 20 20 20 20 20 20 27 |gma, | '| |00004160| 50 72 61 67 6d 61 27 29 | 3b 20 20 20 20 20 20 20 |Pragma')|; | |00004170| 20 20 20 20 20 2f 2f 20 | 53 65 63 74 69 6f 6e 20 | // |Section | |00004180| 31 34 2e 33 32 0d 0a 20 | 20 41 64 64 28 73 2c 20 |14.32.. | Add(s, | |00004190| 54 72 61 6e 73 66 65 72 | 45 6e 63 6f 64 69 6e 67 |Transfer|Encoding| |000041a0| 2c 20 27 54 72 61 6e 73 | 66 65 72 2d 45 6e 63 6f |, 'Trans|fer-Enco| |000041b0| 64 69 6e 67 27 29 3b 20 | 2f 2f 20 53 65 63 74 69 |ding'); |// Secti| |000041c0| 6f 6e 20 31 34 2e 34 30 | 0d 0a 20 20 41 64 64 28 |on 14.40|.. Add(| |000041d0| 73 2c 20 55 70 67 72 61 | 64 65 2c 20 20 20 20 20 |s, Upgra|de, | |000041e0| 20 20 20 20 20 27 55 70 | 67 72 61 64 65 27 29 3b | 'Up|grade');| |000041f0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 53 65 | | // Se| |00004200| 63 74 69 6f 6e 20 31 34 | 2e 34 31 0d 0a 20 20 41 |ction 14|.41.. A| |00004210| 64 64 28 73 2c 20 56 69 | 61 2c 20 20 20 20 20 20 |dd(s, Vi|a, | |00004220| 20 20 20 20 20 20 20 20 | 27 56 69 61 27 29 3b 20 | |'Via'); | |00004230| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2f | | //| |00004240| 20 53 65 63 74 69 6f 6e | 20 31 34 2e 34 34 0d 0a | Section| 14.44..| |00004250| 20 20 52 65 73 75 6c 74 | 20 3a 3d 20 73 3b 0d 0a | Result| := s;..| |00004260| 65 6e 64 3b 0d 0a 0d 0a | 70 72 6f 63 65 64 75 72 |end;....|procedur| |00004270| 65 20 54 45 6e 74 69 74 | 79 48 65 61 64 65 72 2e |e TEntit|yHeader.| |00004280| 43 6f 70 79 45 6e 74 69 | 74 79 42 6f 64 79 28 43 |CopyEnti|tyBody(C| |00004290| 6f 6c 6c 65 63 74 6f 72 | 3a 20 54 43 6f 6c 6c 65 |ollector|: TColle| |000042a0| 63 74 6f 72 29 3b 0d 0a | 62 65 67 69 6e 0d 0a 20 |ctor);..|begin.. | |000042b0| 20 45 6e 74 69 74 79 4c | 65 6e 67 74 68 20 3a 3d | EntityL|ength :=| |000042c0| 20 43 6f 6c 6c 65 63 74 | 6f 72 2e 43 6f 6e 74 65 | Collect|or.Conte| |000042d0| 6e 74 4c 65 6e 67 74 68 | 3b 0d 0a 20 20 43 6f 6e |ntLength|;.. Con| |000042e0| 74 65 6e 74 4c 65 6e 67 | 74 68 20 3a 3d 20 49 74 |tentLeng|th := It| |000042f0| 6f 53 28 43 6f 6c 6c 65 | 63 74 6f 72 2e 43 6f 6e |oS(Colle|ctor.Con| |00004300| 74 65 6e 74 4c 65 6e 67 | 74 68 29 3b 0d 0a 20 20 |tentLeng|th);.. | |00004310| 45 6e 74 69 74 79 42 6f | 64 79 20 3a 3d 20 43 6f |EntityBo|dy := Co| |00004320| 70 79 28 43 6f 6c 6c 65 | 63 74 6f 72 2e 45 6e 74 |py(Colle|ctor.Ent| |00004330| 69 74 79 42 6f 64 79 2c | 20 31 2c 20 45 6e 74 69 |ityBody,| 1, Enti| |00004340| 74 79 4c 65 6e 67 74 68 | 29 3b 0d 0a 65 6e 64 3b |tyLength|);..end;| |00004350| 0d 0a 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 54 45 6e |....func|tion TEn| |00004360| 74 69 74 79 48 65 61 64 | 65 72 2e 46 69 6c 74 65 |tityHead|er.Filte| |00004370| 72 28 63 6f 6e 73 74 20 | 7a 2c 20 73 3a 20 73 74 |r(const |z, s: st| |00004380| 72 69 6e 67 29 3a 20 42 | 6f 6f 6c 65 61 6e 3b 0d |ring): B|oolean;.| |00004390| 0a 62 65 67 69 6e 0d 0a | 20 20 52 65 73 75 6c 74 |.begin..| Result| |000043a0| 20 3a 3d 20 54 72 75 65 | 3b 0d 0a 20 20 69 66 20 | := True|;.. if | |000043b0| 7a 20 3d 20 27 41 4c 4c | 4f 57 27 20 20 20 20 20 |z = 'ALL|OW' | |000043c0| 20 20 20 20 20 20 20 74 | 68 65 6e 20 41 6c 6c 6f | t|hen Allo| |000043d0| 77 20 20 20 20 20 20 20 | 20 20 20 20 3a 3d 20 73 |w | := s| |000043e0| 20 65 6c 73 65 20 2f 2f | 20 31 34 2e 37 0d 0a 20 | else //| 14.7.. | |000043f0| 20 69 66 20 7a 20 3d 20 | 27 43 4f 4e 54 45 4e 54 | if z = |'CONTENT| |00004400| 2d 42 41 53 45 27 20 20 | 20 20 20 74 68 65 6e 20 |-BASE' | then | |00004410| 43 6f 6e 74 65 6e 74 42 | 61 73 65 20 20 20 20 20 |ContentB|ase | |00004420| 3a 3d 20 73 20 65 6c 73 | 65 20 2f 2f 20 31 34 2e |:= s els|e // 14.| |00004430| 31 31 0d 0a 20 20 69 66 | 20 7a 20 3d 20 27 43 4f |11.. if| z = 'CO| |00004440| 4e 54 45 4e 54 2d 45 4e | 43 4f 44 49 4e 47 27 20 |NTENT-EN|CODING' | |00004450| 74 68 65 6e 20 43 6f 6e | 74 65 6e 74 45 6e 63 6f |then Con|tentEnco| |00004460| 64 69 6e 67 20 3a 3d 20 | 73 20 65 6c 73 65 20 2f |ding := |s else /| |00004470| 2f 20 31 34 2e 31 32 0d | 0a 20 20 69 66 20 7a 20 |/ 14.12.|. if z | |00004480| 3d 20 27 43 4f 4e 54 45 | 4e 54 2d 4c 41 4e 47 55 |= 'CONTE|NT-LANGU| |00004490| 41 47 45 27 20 74 68 65 | 6e 20 43 6f 6e 74 65 6e |AGE' the|n Conten| |000044a0| 74 4c 61 6e 67 75 61 67 | 65 20 3a 3d 20 73 20 65 |tLanguag|e := s e| |000044b0| 6c 73 65 20 2f 2f 20 31 | 34 2e 31 33 0d 0a 20 20 |lse // 1|4.13.. | |000044c0| 69 66 20 7a 20 3d 20 27 | 43 4f 4e 54 45 4e 54 2d |if z = '|CONTENT-| |000044d0| 4c 45 4e 47 54 48 27 20 | 20 20 74 68 65 6e 20 43 |LENGTH' | then C| |000044e0| 6f 6e 74 65 6e 74 4c 65 | 6e 67 74 68 20 20 20 3a |ontentLe|ngth :| |000044f0| 3d 20 73 20 65 6c 73 65 | 20 2f 2f 20 31 34 2e 31 |= s else| // 14.1| |00004500| 34 0d 0a 20 20 69 66 20 | 7a 20 3d 20 27 43 4f 4e |4.. if |z = 'CON| |00004510| 54 45 4e 54 2d 4c 4f 43 | 41 54 49 4f 4e 27 20 74 |TENT-LOC|ATION' t| |00004520| 68 65 6e 20 43 6f 6e 74 | 65 6e 74 4c 6f 63 61 74 |hen Cont|entLocat| |00004530| 69 6f 6e 20 3a 3d 20 73 | 20 65 6c 73 65 20 2f 2f |ion := s| else //| |00004540| 20 31 34 2e 31 35 0d 0a | 20 20 69 66 20 7a 20 3d | 14.15..| if z =| |00004550| 20 27 43 4f 4e 54 45 4e | 54 2d 4d 44 35 27 20 20 | 'CONTEN|T-MD5' | |00004560| 20 20 20 20 74 68 65 6e | 20 43 6f 6e 74 65 6e 74 | then| Content| |00004570| 4d 44 35 20 20 20 20 20 | 20 3a 3d 20 73 20 65 6c |MD5 | := s el| |00004580| 73 65 20 2f 2f 20 31 34 | 2e 31 36 0d 0a 20 20 69 |se // 14|.16.. i| |00004590| 66 20 7a 20 3d 20 27 43 | 4f 4e 54 45 4e 54 2d 52 |f z = 'C|ONTENT-R| |000045a0| 41 4e 47 45 27 20 20 20 | 20 74 68 65 6e 20 43 6f |ANGE' | then Co| |000045b0| 6e 74 65 6e 74 52 61 6e | 67 65 20 20 20 20 3a 3d |ntentRan|ge :=| |000045c0| 20 73 20 65 6c 73 65 20 | 2f 2f 20 31 34 2e 31 37 | s else |// 14.17| |000045d0| 0d 0a 20 20 69 66 20 7a | 20 3d 20 27 43 4f 4e 54 |.. if z| = 'CONT| |000045e0| 45 4e 54 2d 54 59 50 45 | 27 20 20 20 20 20 74 68 |ENT-TYPE|' th| |000045f0| 65 6e 20 43 6f 6e 74 65 | 6e 74 54 79 70 65 20 20 |en Conte|ntType | |00004600| 20 20 20 3a 3d 20 73 20 | 65 6c 73 65 20 2f 2f 20 | := s |else // | |00004610| 31 34 2e 31 38 0d 0a 20 | 20 69 66 20 7a 20 3d 20 |14.18.. | if z = | |00004620| 27 45 54 41 47 27 20 20 | 20 20 20 20 20 20 20 20 |'ETAG' | | |00004630| 20 20 20 74 68 65 6e 20 | 45 54 61 67 20 20 20 20 | then |ETag | |00004640| 20 20 20 20 20 20 20 20 | 3a 3d 20 73 20 65 6c 73 | |:= s els| |00004650| 65 20 2f 2f 20 31 34 2e | 32 30 0d 0a 20 20 69 66 |e // 14.|20.. if| |00004660| 20 7a 20 3d 20 27 45 58 | 50 49 52 45 53 27 20 20 | z = 'EX|PIRES' | |00004670| 20 20 20 20 20 20 20 20 | 74 68 65 6e 20 45 78 70 | |then Exp| |00004680| 69 72 65 73 20 20 20 20 | 20 20 20 20 20 3a 3d 20 |ires | := | |00004690| 73 20 65 6c 73 65 20 2f | 2f 20 31 34 2e 32 31 0d |s else /|/ 14.21.| |000046a0| 0a 20 20 69 66 20 7a 20 | 3d 20 27 4c 41 53 54 2d |. if z |= 'LAST-| |000046b0| 4d 4f 44 49 46 49 45 44 | 27 20 20 20 20 74 68 65 |MODIFIED|' the| |000046c0| 6e 20 4c 61 73 74 4d 6f | 64 69 66 69 65 64 20 20 |n LastMo|dified | |000046d0| 20 20 3a 3d 20 73 20 65 | 6c 73 65 20 2f 2f 20 31 | := s e|lse // 1| |000046e0| 34 2e 32 39 0d 0a 20 20 | 7b 54 68 69 73 20 69 73 |4.29.. |{This is| |000046f0| 20 74 77 6f 20 68 65 61 | 64 65 72 73 20 66 6f 72 | two hea|ders for| |00004700| 20 66 69 6c 65 20 64 6f | 77 6e 6c 6f 61 64 20 62 | file do|wnload b| |00004710| 79 20 43 47 49 7d 0d 0a | 20 20 69 66 20 7a 20 3d |y CGI}..| if z =| |00004720| 20 27 41 43 43 45 50 54 | 2d 52 41 4e 47 45 53 27 | 'ACCEPT|-RANGES'| |00004730| 20 20 20 20 74 68 65 6e | 20 41 63 63 65 70 74 52 | then| AcceptR| |00004740| 61 6e 67 65 73 20 20 20 | 20 3a 3d 20 73 20 65 6c |anges | := s el| |00004750| 73 65 20 2f 2f 20 31 34 | 2e 35 0d 0a 20 20 69 66 |se // 14|.5.. if| |00004760| 20 7a 20 3d 20 27 43 4f | 4e 54 45 4e 54 2d 44 49 | z = 'CO|NTENT-DI| |00004770| 53 50 4f 53 49 54 49 4f | 4e 27 20 74 68 65 6e 20 |SPOSITIO|N' then | |00004780| 43 6f 6e 74 65 6e 74 44 | 69 73 70 6f 73 69 74 69 |ContentD|ispositi| |00004790| 6f 6e 20 3a 3d 20 73 20 | 65 6c 73 65 20 2f 2f 20 |on := s |else // | |000047a0| 31 35 2e 31 30 0d 0a 20 | 20 69 66 20 7a 20 3d 20 |15.10.. | if z = | |000047b0| 27 53 54 41 54 55 53 27 | 20 20 20 20 20 20 20 20 |'STATUS'| | |000047c0| 20 20 20 74 68 65 6e 0d | 0a 20 20 43 47 49 53 74 | then.|. CGISt| |000047d0| 61 74 75 73 20 20 20 20 | 20 20 20 3a 3d 20 73 0d |atus | := s.| |000047e0| 0a 20 20 65 6c 73 65 0d | 0a 20 20 69 66 20 7a 20 |. else.|. if z | |000047f0| 3d 20 27 4c 4f 43 41 54 | 49 4f 4e 27 20 20 20 20 |= 'LOCAT|ION' | |00004800| 20 20 20 20 20 74 68 65 | 6e 20 43 47 49 4c 6f 63 | the|n CGILoc| |00004810| 61 74 69 6f 6e 20 20 20 | 20 20 3a 3d 20 73 20 65 |ation | := s e| |00004820| 6c 73 65 0d 0a 20 20 69 | 66 20 7a 20 3d 20 27 53 |lse.. i|f z = 'S| |00004830| 45 54 2d 43 4f 4f 4b 49 | 45 27 20 20 20 20 20 20 |ET-COOKI|E' | |00004840| 20 74 68 65 6e 20 53 65 | 74 43 6f 6f 6b 69 65 20 | then Se|tCookie | |00004850| 20 20 20 20 20 20 3a 3d | 20 73 20 65 6c 73 65 0d | :=| s else.| |00004860| 0a 20 20 20 20 52 65 73 | 75 6c 74 20 3a 3d 20 46 |. Res|ult := F| |00004870| 61 6c 73 65 3b 0d 0a 65 | 6e 64 3b 0d 0a 0d 0a 63 |alse;..e|nd;....c| |00004880| 6f 6e 73 74 72 75 63 74 | 6f 72 20 54 48 54 54 50 |onstruct|or THTTP| |00004890| 44 61 74 61 2e 43 72 65 | 61 74 65 3b 0d 0a 62 65 |Data.Cre|ate;..be| |000048a0| 67 69 6e 0d 0a 20 20 69 | 6e 68 65 72 69 74 65 64 |gin.. i|nherited| |000048b0| 20 43 72 65 61 74 65 3b | 0d 0a 20 20 52 65 71 75 | Create;|.. Requ| |000048c0| 65 73 74 43 6f 6c 6c 65 | 63 74 6f 72 20 3a 3d 20 |estColle|ctor := | |000048d0| 54 43 6f 6c 6c 65 63 74 | 6f 72 2e 43 72 65 61 74 |TCollect|or.Creat| |000048e0| 65 3b 0d 0a 20 20 52 65 | 71 75 65 73 74 47 65 6e |e;.. Re|questGen| |000048f0| 65 72 61 6c 48 65 61 64 | 65 72 20 3a 3d 20 54 47 |eralHead|er := TG| |00004900| 65 6e 65 72 61 6c 48 65 | 61 64 65 72 2e 43 72 65 |eneralHe|ader.Cre| |00004910| 61 74 65 3b 0d 0a 20 20 | 52 65 71 75 65 73 74 52 |ate;.. |RequestR| |00004920| 65 71 75 65 73 74 48 65 | 61 64 65 72 20 3a 3d 20 |equestHe|ader := | |00004930| 54 52 65 71 75 65 73 74 | 48 65 61 64 65 72 2e 43 |TRequest|Header.C| |00004940| 72 65 61 74 65 3b 0d 0a | 20 20 52 65 71 75 65 73 |reate;..| Reques| |00004950| 74 45 6e 74 69 74 79 48 | 65 61 64 65 72 20 3a 3d |tEntityH|eader :=| |00004960| 20 54 45 6e 74 69 74 79 | 48 65 61 64 65 72 2e 43 | TEntity|Header.C| |00004970| 72 65 61 74 65 3b 0d 0a | 65 6e 64 3b 0d 0a 0d 0a |reate;..|end;....| |00004980| 64 65 73 74 72 75 63 74 | 6f 72 20 54 48 54 54 50 |destruct|or THTTP| |00004990| 44 61 74 61 2e 44 65 73 | 74 72 6f 79 3b 0d 0a 62 |Data.Des|troy;..b| |000049a0| 65 67 69 6e 0d 0a 20 20 | 46 72 65 65 4f 62 6a 65 |egin.. |FreeObje| |000049b0| 63 74 28 52 65 71 75 65 | 73 74 43 6f 6c 6c 65 63 |ct(Reque|stCollec| |000049c0| 74 6f 72 29 3b 0d 0a 20 | 20 46 72 65 65 4f 62 6a |tor);.. | FreeObj| |000049d0| 65 63 74 28 52 65 71 75 | 65 73 74 47 65 6e 65 72 |ect(Requ|estGener| |000049e0| 61 6c 48 65 61 64 65 72 | 29 3b 0d 0a 20 20 46 72 |alHeader|);.. Fr| |000049f0| 65 65 4f 62 6a 65 63 74 | 28 52 65 71 75 65 73 74 |eeObject|(Request| |00004a00| 52 65 71 75 65 73 74 48 | 65 61 64 65 72 29 3b 0d |RequestH|eader);.| |00004a10| 0a 20 20 46 72 65 65 4f | 62 6a 65 63 74 28 52 65 |. FreeO|bject(Re| |00004a20| 71 75 65 73 74 45 6e 74 | 69 74 79 48 65 61 64 65 |questEnt|ityHeade| |00004a30| 72 29 3b 0d 0a 20 20 46 | 72 65 65 4f 62 6a 65 63 |r);.. F|reeObjec| |00004a40| 74 28 52 65 73 70 6f 6e | 73 65 47 65 6e 65 72 61 |t(Respon|seGenera| |00004a50| 6c 48 65 61 64 65 72 29 | 3b 0d 0a 20 20 46 72 65 |lHeader)|;.. Fre| |00004a60| 65 4f 62 6a 65 63 74 28 | 52 65 73 70 6f 6e 73 65 |eObject(|Response| |00004a70| 52 65 73 70 6f 6e 73 65 | 48 65 61 64 65 72 29 3b |Response|Header);| |00004a80| 0d 0a 20 20 46 72 65 65 | 4f 62 6a 65 63 74 28 52 |.. Free|Object(R| |00004a90| 65 73 70 6f 6e 73 65 45 | 6e 74 69 74 79 48 65 61 |esponseE|ntityHea| |00004aa0| 64 65 72 29 3b 0d 0a 20 | 20 5a 65 72 6f 48 61 6e |der);.. | ZeroHan| |00004ab0| 64 6c 65 28 46 48 61 6e | 64 6c 65 29 3b 0d 0a 20 |dle(FHan|dle);.. | |00004ac0| 20 69 6e 68 65 72 69 74 | 65 64 20 44 65 73 74 72 | inherit|ed Destr| |00004ad0| 6f 79 3b 0d 0a 65 6e 64 | 3b 0d 0a 0d 0a 70 72 6f |oy;..end|;....pro| |00004ae0| 63 65 64 75 72 65 20 54 | 43 6f 6c 6c 65 63 74 6f |cedure T|Collecto| |00004af0| 72 2e 53 65 74 43 6f 6e | 74 65 6e 74 4c 65 6e 67 |r.SetCon|tentLeng| |00004b00| 74 68 28 69 3a 20 49 6e | 74 65 67 65 72 29 3b 0d |th(i: In|teger);.| |00004b10| 0a 62 65 67 69 6e 0d 0a | 20 20 43 6f 6e 74 65 6e |.begin..| Conten| |00004b20| 74 4c 65 6e 67 74 68 20 | 3a 3d 20 69 3b 0d 0a 20 |tLength |:= i;.. | |00004b30| 20 47 6f 74 45 6e 74 69 | 74 79 42 6f 64 79 20 3a | GotEnti|tyBody :| |00004b40| 3d 20 43 6f 6e 74 65 6e | 74 4c 65 6e 67 74 68 20 |= Conten|tLength | |00004b50| 3c 3d 20 4c 65 6e 67 74 | 68 28 45 6e 74 69 74 79 |<= Lengt|h(Entity| |00004b60| 42 6f 64 79 29 3b 0d 0a | 65 6e 64 3b 0d 0a 0d 0a |Body);..|end;....| |00004b70| 66 75 6e 63 74 69 6f 6e | 20 54 43 6f 6c 6c 65 63 |function| TCollec| |00004b80| 74 6f 72 2e 4c 69 6e 65 | 41 76 61 69 6c 3a 20 42 |tor.Line|Avail: B| |00004b90| 6f 6f 6c 65 61 6e 3b 0d | 0a 62 65 67 69 6e 0d 0a |oolean;.|.begin..| |00004ba0| 20 20 52 65 73 75 6c 74 | 20 3a 3d 20 4c 69 6e 65 | Result| := Line| |00004bb0| 73 2e 43 6f 75 6e 74 20 | 3e 20 30 3b 0d 0a 65 6e |s.Count |> 0;..en| |00004bc0| 64 3b 0d 0a 0d 0a 66 75 | 6e 63 74 69 6f 6e 20 54 |d;....fu|nction T| |00004bd0| 43 6f 6c 6c 65 63 74 6f | 72 2e 47 65 74 4e 65 78 |Collecto|r.GetNex| |00004be0| 74 4c 69 6e 65 3a 20 73 | 74 72 69 6e 67 3b 0d 0a |tLine: s|tring;..| |00004bf0| 62 65 67 69 6e 0d 0a 20 | 20 52 65 73 75 6c 74 20 |begin.. | Result | |00004c00| 3a 3d 20 4c 69 6e 65 73 | 5b 30 5d 3b 20 4c 69 6e |:= Lines|[0]; Lin| |00004c10| 65 73 2e 41 74 46 72 65 | 65 28 30 29 3b 0d 0a 65 |es.AtFre|e(0);..e| |00004c20| 6e 64 3b 0d 0a 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |nd;....f|unction | |00004c30| 54 43 6f 6c 6c 65 63 74 | 6f 72 2e 43 6f 6c 6c 65 |TCollect|or.Colle| |00004c40| 63 74 28 76 61 72 20 42 | 75 66 3a 20 54 48 54 54 |ct(var B|uf: THTT| |00004c50| 50 53 65 72 76 65 72 54 | 68 72 65 61 64 42 75 66 |PServerT|hreadBuf| |00004c60| 65 72 3b 20 6a 3a 20 49 | 6e 74 65 67 65 72 29 3a |er; j: I|nteger):| |00004c70| 20 42 6f 6f 6c 65 61 6e | 3b 0d 0a 76 61 72 0d 0a | Boolean|;..var..| |00004c80| 20 20 69 2c 6c 3a 20 49 | 6e 74 65 67 65 72 3b 0d | i,l: I|nteger;.| |00004c90| 0a 62 65 67 69 6e 0d 0a | 20 20 69 66 20 6e 6f 74 |.begin..| if not| |00004ca0| 20 43 6f 6c 6c 65 63 74 | 45 6e 74 69 74 79 42 6f | Collect|EntityBo| |00004cb0| 64 79 20 74 68 65 6e 0d | 0a 20 20 62 65 67 69 6e |dy then.|. begin| |00004cc0| 0d 0a 20 20 20 20 6c 20 | 3a 3d 20 4c 65 6e 67 74 |.. l |:= Lengt| |00004cd0| 68 28 43 6f 6c 6c 65 63 | 74 53 74 72 29 3b 0d 0a |h(Collec|tStr);..| |00004ce0| 20 20 20 20 66 6f 72 20 | 69 20 3a 3d 20 30 20 74 | for |i := 0 t| |00004cf0| 6f 20 6a 2d 31 20 64 6f | 0d 0a 20 20 20 20 62 65 |o j-1 do|.. be| |00004d00| 67 69 6e 0d 0a 20 20 20 | 20 20 20 69 66 20 6c 20 |gin.. | if l | |00004d10| 3c 3d 20 43 6f 6c 6c 65 | 63 74 4c 65 6e 20 74 68 |<= Colle|ctLen th| |00004d20| 65 6e 0d 0a 20 20 20 20 | 20 20 62 65 67 69 6e 0d |en.. | begin.| |00004d30| 0a 20 20 20 20 20 20 20 | 20 49 6e 63 28 6c 2c 20 |. | Inc(l, | |00004d40| 6a 20 2b 20 31 30 30 29 | 3b 0d 0a 20 20 20 20 20 |j + 100)|;.. | |00004d50| 20 20 20 53 65 74 4c 65 | 6e 67 74 68 28 43 6f 6c | SetLe|ngth(Col| |00004d60| 6c 65 63 74 53 74 72 2c | 20 6c 29 3b 0d 0a 20 20 |lectStr,| l);.. | |00004d70| 20 20 20 20 65 6e 64 3b | 0d 0a 20 20 20 20 20 20 | end;|.. | |00004d80| 49 6e 63 28 43 6f 6c 6c | 65 63 74 4c 65 6e 29 3b |Inc(Coll|ectLen);| |00004d90| 0d 0a 20 20 20 20 20 20 | 43 6f 6c 6c 65 63 74 53 |.. |CollectS| |00004da0| 74 72 5b 43 6f 6c 6c 65 | 63 74 4c 65 6e 5d 20 3a |tr[Colle|ctLen] :| |00004db0| 3d 20 42 75 66 5b 69 5d | 3b 0d 0a 20 20 20 20 20 |= Buf[i]|;.. | |00004dc0| 20 69 66 20 28 43 6f 6c | 6c 65 63 74 4c 65 6e 20 | if (Col|lectLen | |00004dd0| 3e 3d 20 32 29 20 61 6e | 64 20 28 43 6f 6c 6c 65 |>= 2) an|d (Colle| |00004de0| 63 74 53 74 72 5b 43 6f | 6c 6c 65 63 74 4c 65 6e |ctStr[Co|llectLen| |00004df0| 5d 20 3d 20 23 31 30 29 | 20 61 6e 64 20 28 43 6f |] = #10)| and (Co| |00004e00| 6c 6c 65 63 74 53 74 72 | 5b 43 6f 6c 6c 65 63 74 |llectStr|[Collect| |00004e10| 4c 65 6e 2d 31 5d 20 3d | 20 23 31 33 29 20 74 68 |Len-1] =| #13) th| |00004e20| 65 6e 0d 0a 20 20 20 20 | 20 20 62 65 67 69 6e 0d |en.. | begin.| |00004e30| 0a 20 20 20 20 20 20 20 | 20 69 66 20 43 6f 6c 6c |. | if Coll| |00004e40| 65 63 74 4c 65 6e 20 3d | 20 32 20 74 68 65 6e 0d |ectLen =| 2 then.| |00004e50| 0a 20 20 20 20 20 20 20 | 20 62 65 67 69 6e 0d 0a |. | begin..| |00004e60| 20 20 20 20 20 20 20 20 | 20 20 43 6f 6c 6c 65 63 | | Collec| |00004e70| 74 45 6e 74 69 74 79 42 | 6f 64 79 20 3a 3d 20 54 |tEntityB|ody := T| |00004e80| 72 75 65 3b 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |rue;.. | | |00004e90| 44 65 63 28 6a 2c 20 69 | 2b 31 29 3b 0d 0a 20 20 |Dec(j, i|+1);.. | |00004ea0| 20 20 20 20 20 20 20 20 | 69 66 20 6a 20 3e 20 30 | |if j > 0| |00004eb0| 20 74 68 65 6e 20 4d 6f | 76 65 28 42 75 66 5b 69 | then Mo|ve(Buf[i| |00004ec0| 2b 31 5d 2c 20 42 75 66 | 5b 30 5d 2c 20 6a 29 3b |+1], Buf|[0], j);| |00004ed0| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 42 72 65 61 |.. | Brea| |00004ee0| 6b 3b 0d 0a 20 20 20 20 | 20 20 20 20 65 6e 64 20 |k;.. | end | |00004ef0| 65 6c 73 65 0d 0a 20 20 | 20 20 20 20 20 20 62 65 |else.. | be| |00004f00| 67 69 6e 0d 0a 20 20 20 | 20 20 20 20 20 20 20 4c |gin.. | L| |00004f10| 69 6e 65 73 2e 41 64 64 | 28 43 6f 70 79 28 43 6f |ines.Add|(Copy(Co| |00004f20| 6c 6c 65 63 74 53 74 72 | 2c 20 31 2c 20 43 6f 6c |llectStr|, 1, Col| |00004f30| 6c 65 63 74 4c 65 6e 2d | 32 29 29 3b 0d 0a 20 20 |lectLen-|2));.. | |00004f40| 20 20 20 20 20 20 20 20 | 43 6f 6c 6c 65 63 74 4c | |CollectL| |00004f50| 65 6e 20 3a 3d 20 30 3b | 0d 0a 20 20 20 20 20 20 |en := 0;|.. | |00004f60| 20 20 65 6e 64 3b 0d 0a | 20 20 20 20 20 20 65 6e | end;..| en| |00004f70| 64 3b 0d 0a 20 20 20 20 | 65 6e 64 3b 0d 0a 20 20 |d;.. |end;.. | |00004f80| 65 6e 64 3b 0d 0a 0d 0a | 20 20 69 66 20 43 6f 6c |end;....| if Col| |00004f90| 6c 65 63 74 45 6e 74 69 | 74 79 42 6f 64 79 20 74 |lectEnti|tyBody t| |00004fa0| 68 65 6e 0d 0a 20 20 62 | 65 67 69 6e 0d 0a 20 20 |hen.. b|egin.. | |00004fb0| 20 20 69 66 20 28 43 6f | 6c 6c 65 63 74 45 6e 74 | if (Co|llectEnt| |00004fc0| 69 74 79 42 6f 64 79 29 | 20 61 6e 64 20 28 6a 3e |ityBody)| and (j>| |00004fd0| 30 29 20 74 68 65 6e 0d | 0a 20 20 20 20 62 65 67 |0) then.|. beg| |00004fe0| 69 6e 0d 0a 20 20 20 20 | 20 20 69 20 3a 3d 20 4c |in.. | i := L| |00004ff0| 65 6e 67 74 68 28 45 6e | 74 69 74 79 42 6f 64 79 |ength(En|tityBody| |00005000| 29 3b 0d 0a 20 20 20 20 | 20 20 53 65 74 4c 65 6e |);.. | SetLen| |00005010| 67 74 68 28 45 6e 74 69 | 74 79 42 6f 64 79 2c 20 |gth(Enti|tyBody, | |00005020| 69 2b 6a 29 3b 0d 0a 20 | 20 20 20 20 20 4d 6f 76 |i+j);.. | Mov| |00005030| 65 28 42 75 66 2c 20 45 | 6e 74 69 74 79 42 6f 64 |e(Buf, E|ntityBod| |00005040| 79 5b 69 2b 31 5d 2c 20 | 6a 29 3b 0d 0a 20 20 20 |y[i+1], |j);.. | |00005050| 20 65 6e 64 3b 0d 0a 20 | 20 20 20 47 6f 74 45 6e | end;.. | GotEn| |00005060| 74 69 74 79 42 6f 64 79 | 20 3a 3d 20 43 6f 6e 74 |tityBody| := Cont| |00005070| 65 6e 74 4c 65 6e 67 74 | 68 20 3c 3d 20 4c 65 6e |entLengt|h <= Len| |00005080| 67 74 68 28 45 6e 74 69 | 74 79 42 6f 64 79 29 3b |gth(Enti|tyBody);| |00005090| 0d 0a 20 20 65 6e 64 3b | 0d 0a 20 20 52 65 73 75 |.. end;|.. Resu| |000050a0| 6c 74 20 3a 3d 20 54 72 | 75 65 3b 0d 0a 65 6e 64 |lt := Tr|ue;..end| |000050b0| 3b 0d 0a 0d 0a 63 6f 6e | 73 74 72 75 63 74 6f 72 |;....con|structor| |000050c0| 20 54 43 6f 6c 6c 65 63 | 74 6f 72 2e 43 72 65 61 | TCollec|tor.Crea| |000050d0| 74 65 3b 0d 0a 62 65 67 | 69 6e 0d 0a 20 20 69 6e |te;..beg|in.. in| |000050e0| 68 65 72 69 74 65 64 20 | 43 72 65 61 74 65 3b 0d |herited |Create;.| |000050f0| 0a 20 20 4c 69 6e 65 73 | 20 3a 3d 20 54 53 74 72 |. Lines| := TStr| |00005100| 69 6e 67 43 6f 6c 6c 2e | 43 72 65 61 74 65 3b 0d |ingColl.|Create;.| |00005110| 0a 2f 2f 20 20 4c 69 6e | 65 73 2e 4c 6f 6e 67 53 |.// Lin|es.LongS| |00005120| 74 72 69 6e 67 3b 0d 0a | 65 6e 64 3b 0d 0a 0d 0a |tring;..|end;....| |00005130| 64 65 73 74 72 75 63 74 | 6f 72 20 54 43 6f 6c 6c |destruct|or TColl| |00005140| 65 63 74 6f 72 2e 44 65 | 73 74 72 6f 79 3b 0d 0a |ector.De|stroy;..| |00005150| 62 65 67 69 6e 0d 0a 20 | 20 46 72 65 65 4f 62 6a |begin.. | FreeObj| |00005160| 65 63 74 28 4c 69 6e 65 | 73 29 3b 0d 0a 20 20 69 |ect(Line|s);.. i| |00005170| 6e 68 65 72 69 74 65 64 | 20 44 65 73 74 72 6f 79 |nherited| Destroy| |00005180| 3b 0d 0a 65 6e 64 3b 0d | 0a 0d 0a 0d 0a 70 72 6f |;..end;.|.....pro| |00005190| 63 65 64 75 72 65 20 54 | 50 69 70 65 57 72 69 74 |cedure T|PipeWrit| |000051a0| 65 53 74 64 54 68 72 65 | 61 64 2e 45 78 65 63 75 |eStdThre|ad.Execu| |000051b0| 74 65 3b 0d 0a 76 61 72 | 0d 0a 20 20 6a 3a 20 44 |te;..var|.. j: D| |000051c0| 57 4f 52 44 3b 0d 0a 20 | 20 73 6c 65 6e 3a 20 49 |WORD;.. | slen: I| |000051d0| 6e 74 65 67 65 72 3b 0d | 0a 62 65 67 69 6e 0d 0a |nteger;.|.begin..| |000051e0| 20 20 73 6c 65 6e 20 3a | 3d 20 4c 65 6e 67 74 68 | slen :|= Length| |000051f0| 28 73 29 3b 0d 0a 20 20 | 69 66 20 73 6c 65 6e 20 |(s);.. |if slen | |00005200| 3e 20 30 20 74 68 65 6e | 20 57 72 69 74 65 46 69 |> 0 then| WriteFi| |00005210| 6c 65 28 48 50 69 70 65 | 2c 20 73 5b 31 5d 2c 20 |le(HPipe|, s[1], | |00005220| 73 6c 65 6e 2c 20 6a 2c | 20 6e 69 6c 29 3b 0d 0a |slen, j,| nil);..| |00005230| 65 6e 64 3b 0d 0a 0d 0a | 66 75 6e 63 74 69 6f 6e |end;....|function| |00005240| 20 44 6f 43 6f 6c 6c 65 | 63 74 28 43 6f 6c 6c 65 | DoColle|ct(Colle| |00005250| 63 74 6f 72 3a 20 54 43 | 6f 6c 6c 65 63 74 6f 72 |ctor: TC|ollector| |00005260| 3b 20 45 6e 74 69 74 79 | 48 65 61 64 65 72 3a 20 |; Entity|Header: | |00005270| 54 45 6e 74 69 74 79 48 | 65 61 64 65 72 3b 20 6a |TEntityH|eader; j| |00005280| 3a 20 49 6e 74 65 67 65 | 72 3b 20 42 75 66 66 65 |: Intege|r; Buffe| |00005290| 72 3a 20 54 48 54 54 50 | 53 65 72 76 65 72 54 68 |r: THTTP|ServerTh| |000052a0| 72 65 61 64 42 75 66 65 | 72 29 3a 20 42 6f 6f 6c |readBufe|r): Bool| |000052b0| 65 61 6e 3b 0d 0a 76 61 | 72 0d 0a 20 20 73 2c 7a |ean;..va|r.. s,z| |000052c0| 3a 20 73 74 72 69 6e 67 | 3b 0d 0a 62 65 67 69 6e |: string|;..begin| |000052d0| 0d 0a 20 20 52 65 73 75 | 6c 74 20 3a 3d 20 54 72 |.. Resu|lt := Tr| |000052e0| 75 65 3b 0d 0a 20 20 69 | 66 20 6e 6f 74 20 43 6f |ue;.. i|f not Co| |000052f0| 6c 6c 65 63 74 6f 72 2e | 43 6f 6c 6c 65 63 74 28 |llector.|Collect(| |00005300| 42 75 66 66 65 72 2c 20 | 6a 29 20 74 68 65 6e 20 |Buffer, |j) then | |00005310| 52 65 73 75 6c 74 20 3a | 3d 20 46 61 6c 73 65 20 |Result :|= False | |00005320| 65 6c 73 65 0d 0a 20 20 | 69 66 20 43 6f 6c 6c 65 |else.. |if Colle| |00005330| 63 74 6f 72 2e 43 6f 6c | 6c 65 63 74 45 6e 74 69 |ctor.Col|lectEnti| |00005340| 74 79 42 6f 64 79 20 74 | 68 65 6e 0d 0a 20 20 69 |tyBody t|hen.. i| |00005350| 66 20 6e 6f 74 20 43 6f | 6c 6c 65 63 74 6f 72 2e |f not Co|llector.| |00005360| 50 61 72 73 65 64 20 74 | 68 65 6e 0d 0a 20 20 62 |Parsed t|hen.. b| |00005370| 65 67 69 6e 0d 0a 20 20 | 20 20 43 6f 6c 6c 65 63 |egin.. | Collec| |00005380| 74 6f 72 2e 50 61 72 73 | 65 64 20 3a 3d 20 54 72 |tor.Pars|ed := Tr| |00005390| 75 65 3b 0d 0a 20 20 20 | 20 77 68 69 6c 65 20 43 |ue;.. | while C| |000053a0| 6f 6c 6c 65 63 74 6f 72 | 2e 4c 69 6e 65 41 76 61 |ollector|.LineAva| |000053b0| 69 6c 20 64 6f 0d 0a 20 | 20 20 20 62 65 67 69 6e |il do.. | begin| |000053c0| 0d 0a 20 20 20 20 20 20 | 73 20 3a 3d 20 43 6f 6c |.. |s := Col| |000053d0| 6c 65 63 74 6f 72 2e 47 | 65 74 4e 65 78 74 4c 69 |lector.G|etNextLi| |000053e0| 6e 65 3b 0d 0a 20 20 20 | 20 20 20 69 66 20 4c 65 |ne;.. | if Le| |000053f0| 6e 67 74 68 28 73 29 3c | 34 20 74 68 65 6e 20 62 |ngth(s)<|4 then b| |00005400| 65 67 69 6e 20 52 65 73 | 75 6c 74 20 3a 3d 20 46 |egin Res|ult := F| |00005410| 61 6c 73 65 3b 20 42 72 | 65 61 6b 20 65 6e 64 20 |alse; Br|eak end | |00005420| 65 6c 73 65 0d 0a 20 20 | 20 20 20 20 62 65 67 69 |else.. | begi| |00005430| 6e 0d 0a 20 20 20 20 20 | 20 20 20 47 65 74 57 72 |n.. | GetWr| |00005440| 64 53 74 72 69 63 74 55 | 43 28 73 2c 20 7a 29 3b |dStrictU|C(s, z);| |00005450| 0d 0a 20 20 20 20 20 20 | 20 20 44 65 6c 65 74 65 |.. | Delete| |00005460| 28 7a 2c 20 4c 65 6e 67 | 74 68 28 7a 29 2c 20 31 |(z, Leng|th(z), 1| |00005470| 29 3b 0d 0a 20 20 20 20 | 20 20 20 20 69 66 20 6e |);.. | if n| |00005480| 6f 74 20 45 6e 74 69 74 | 79 48 65 61 64 65 72 2e |ot Entit|yHeader.| |00005490| 46 69 6c 74 65 72 28 7a | 2c 20 73 29 20 74 68 65 |Filter(z|, s) the| |000054a0| 6e 0d 0a 20 20 20 20 20 | 20 20 20 62 65 67 69 6e |n.. | begin| |000054b0| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 2f 2f 20 4e |.. | // N| |000054c0| 65 77 20 46 65 61 74 75 | 72 65 20 21 21 21 0d 0a |ew Featu|re !!!..| |000054d0| 20 20 20 20 20 20 20 20 | 65 6e 64 3b 0d 0a 20 20 | |end;.. | |000054e0| 20 20 20 20 65 6e 64 3b | 0d 0a 20 20 20 20 65 6e | end;|.. en| |000054f0| 64 3b 0d 0a 20 20 20 20 | 43 6f 6c 6c 65 63 74 6f |d;.. |Collecto| |00005500| 72 2e 53 65 74 43 6f 6e | 74 65 6e 74 4c 65 6e 67 |r.SetCon|tentLeng| |00005510| 74 68 28 53 74 6f 49 28 | 45 6e 74 69 74 79 48 65 |th(StoI(|EntityHe| |00005520| 61 64 65 72 2e 43 6f 6e | 74 65 6e 74 4c 65 6e 67 |ader.Con|tentLeng| |00005530| 74 68 29 29 3b 0d 0a 20 | 20 65 6e 64 3b 0d 0a 65 |th));.. | end;..e| |00005540| 6e 64 3b 0d 0a 0d 0a 70 | 72 6f 63 65 64 75 72 65 |nd;....p|rocedure| |00005550| 20 54 50 69 70 65 52 65 | 61 64 45 72 72 54 68 72 | TPipeRe|adErrThr| |00005560| 65 61 64 2e 45 78 65 63 | 75 74 65 3b 0d 0a 76 61 |ead.Exec|ute;..va| |00005570| 72 0d 0a 20 20 73 73 3a | 20 53 68 6f 72 74 53 74 |r.. ss:| ShortSt| |00005580| 72 69 6e 67 3b 0d 0a 20 | 20 6a 3a 20 44 57 4f 52 |ring;.. | j: DWOR| |00005590| 44 3b 0d 0a 62 65 67 69 | 6e 0d 0a 20 20 72 65 70 |D;..begi|n.. rep| |000055a0| 65 61 74 0d 0a 20 20 20 | 20 69 66 20 6e 6f 74 20 |eat.. | if not | |000055b0| 52 65 61 64 46 69 6c 65 | 28 48 50 69 70 65 2c 20 |ReadFile|(HPipe, | |000055c0| 73 73 5b 31 5d 2c 20 32 | 35 30 2c 20 6a 2c 20 6e |ss[1], 2|50, j, n| |000055d0| 69 6c 29 20 74 68 65 6e | 20 42 72 65 61 6b 3b 0d |il) then| Break;.| |000055e0| 0a 20 20 20 20 73 73 5b | 30 5d 20 3a 3d 20 43 68 |. ss[|0] := Ch| |000055f0| 61 72 28 6a 29 3b 0d 0a | 20 20 20 20 73 20 3a 3d |ar(j);..| s :=| |00005600| 20 73 20 2b 20 73 73 3b | 0d 0a 20 20 75 6e 74 69 | s + ss;|.. unti| |00005610| 6c 20 54 65 72 6d 69 6e | 61 74 65 64 3b 0d 0a 65 |l Termin|ated;..e| |00005620| 6e 64 3b 0d 0a 0d 0a 0d | 0a 70 72 6f 63 65 64 75 |nd;.....|.procedu| |00005630| 72 65 20 54 50 69 70 65 | 52 65 61 64 53 74 64 54 |re TPipe|ReadStdT| |00005640| 68 72 65 61 64 2e 45 78 | 65 63 75 74 65 3b 0d 0a |hread.Ex|ecute;..| |00005650| 76 61 72 0d 0a 20 20 6a | 3a 20 44 57 4f 52 44 3b |var.. j|: DWORD;| |00005660| 0d 0a 62 65 67 69 6e 0d | 0a 20 20 72 65 70 65 61 |..begin.|. repea| |00005670| 74 0d 0a 20 20 20 20 69 | 66 20 6e 6f 74 20 52 65 |t.. i|f not Re| |00005680| 61 64 46 69 6c 65 28 48 | 50 69 70 65 2c 20 42 75 |adFile(H|Pipe, Bu| |00005690| 66 66 65 72 5e 2c 20 43 | 48 54 54 50 53 65 72 76 |ffer^, C|HTTPServ| |000056a0| 65 72 54 68 72 65 61 64 | 42 75 66 53 69 7a 65 2c |erThread|BufSize,| |000056b0| 20 6a 2c 20 6e 69 6c 29 | 20 74 68 65 6e 20 42 72 | j, nil)| then Br| |000056c0| 65 61 6b 3b 0d 0a 20 20 | 20 20 45 72 72 6f 72 20 |eak;.. | Error | |000056d0| 3a 3d 20 6e 6f 74 20 44 | 6f 43 6f 6c 6c 65 63 74 |:= not D|oCollect| |000056e0| 28 43 6f 6c 6c 65 63 74 | 6f 72 2c 20 45 6e 74 69 |(Collect|or, Enti| |000056f0| 74 79 48 65 61 64 65 72 | 2c 20 6a 2c 20 42 75 66 |tyHeader|, j, Buf| |00005700| 66 65 72 5e 29 3b 0d 0a | 20 20 20 20 69 66 20 45 |fer^);..| if E| |00005710| 72 72 6f 72 20 74 68 65 | 6e 20 42 72 65 61 6b 3b |rror the|n Break;| |00005720| 0d 0a 20 20 20 20 69 66 | 20 28 43 6f 6c 6c 65 63 |.. if| (Collec| |00005730| 74 6f 72 2e 43 6f 6e 74 | 65 6e 74 4c 65 6e 67 74 |tor.Cont|entLengt| |00005740| 68 20 3e 20 30 29 20 61 | 6e 64 20 28 43 6f 6c 6c |h > 0) a|nd (Coll| |00005750| 65 63 74 6f 72 2e 47 6f | 74 45 6e 74 69 74 79 42 |ector.Go|tEntityB| |00005760| 6f 64 79 29 20 74 68 65 | 6e 20 42 72 65 61 6b 3b |ody) the|n Break;| |00005770| 0d 0a 20 20 75 6e 74 69 | 6c 20 54 65 72 6d 69 6e |.. unti|l Termin| |00005780| 61 74 65 64 3b 0d 0a 65 | 6e 64 3b 0d 0a 0d 0a 66 |ated;..e|nd;....f| |00005790| 75 6e 63 74 69 6f 6e 20 | 45 78 65 63 75 74 65 53 |unction |ExecuteS| |000057a0| 63 72 69 70 74 28 63 6f | 6e 73 74 20 41 45 78 65 |cript(co|nst AExe| |000057b0| 63 75 74 61 62 6c 65 2c | 20 41 50 61 74 68 2c 20 |cutable,| APath, | |000057c0| 41 53 63 72 69 70 74 2c | 20 41 51 75 65 72 79 50 |AScript,| AQueryP| |000057d0| 61 72 61 6d 2c 20 41 45 | 6e 76 53 74 72 2c 20 41 |aram, AE|nvStr, A| |000057e0| 53 74 64 49 6e 53 74 72 | 3a 20 73 74 72 69 6e 67 |StdInStr|: string| |000057f0| 3b 20 42 75 66 66 65 72 | 3a 20 54 48 54 54 50 53 |; Buffer|: THTTPS| |00005800| 65 72 76 65 72 54 68 72 | 65 61 64 42 75 66 65 72 |erverThr|eadBufer| |00005810| 3b 20 53 65 6c 66 54 68 | 72 3a 20 54 54 68 72 65 |; SelfTh|r: TThre| |00005820| 61 64 3b 20 76 61 72 20 | 45 72 72 6f 72 4d 73 67 |ad; var |ErrorMsg| |00005830| 3a 20 73 74 72 69 6e 67 | 29 3a 20 54 45 6e 74 69 |: string|): TEnti| |00005840| 74 79 48 65 61 64 65 72 | 3b 0d 0a 76 61 72 0d 0a |tyHeader|;..var..| |00005850| 20 20 53 49 3a 20 54 53 | 74 61 72 74 75 70 49 6e | SI: TS|tartupIn| |00005860| 66 6f 3b 0d 0a 20 20 50 | 49 3a 20 54 50 72 6f 63 |fo;.. P|I: TProc| |00005870| 65 73 73 49 6e 66 6f 72 | 6d 61 74 69 6f 6e 3b 0d |essInfor|mation;.| |00005880| 0a 20 20 53 65 63 75 72 | 69 74 79 3a 20 54 53 65 |. Secur|ity: TSe| |00005890| 63 75 72 69 74 79 41 74 | 74 72 69 62 75 74 65 73 |curityAt|tributes| |000058a0| 3b 0d 0a 20 20 41 63 74 | 75 61 6c 6c 79 3a 20 44 |;.. Act|ually: D| |000058b0| 57 4f 52 44 3b 0d 0a 20 | 20 73 69 5f 72 2c 20 73 |WORD;.. | si_r, s| |000058c0| 69 5f 77 2c 20 73 6f 5f | 72 2c 20 73 6f 5f 77 2c |i_w, so_|r, so_w,| |000058d0| 20 73 65 5f 72 2c 20 73 | 65 5f 77 3a 20 54 48 61 | se_r, s|e_w: THa| |000058e0| 6e 64 6c 65 3b 0d 0a 20 | 20 62 3a 20 42 6f 6f 6c |ndle;.. | b: Bool| |000058f0| 65 61 6e 3b 0d 0a 20 20 | 43 6f 6c 6c 65 63 74 6f |ean;.. |Collecto| |00005900| 72 3a 20 54 43 6f 6c 6c | 65 63 74 6f 72 3b 0d 0a |r: TColl|ector;..| |00005910| 20 20 45 6e 74 69 74 79 | 48 65 61 64 65 72 3a 20 | Entity|Header: | |00005920| 54 45 6e 74 69 74 79 48 | 65 61 64 65 72 3b 0d 0a |TEntityH|eader;..| |00005930| 20 20 50 69 70 65 52 65 | 61 64 53 74 64 54 68 72 | PipeRe|adStdThr| |00005940| 65 61 64 3a 20 54 50 69 | 70 65 52 65 61 64 53 74 |ead: TPi|peReadSt| |00005950| 64 54 68 72 65 61 64 3b | 0d 0a 20 20 50 69 70 65 |dThread;|.. Pipe| |00005960| 57 72 69 74 65 53 74 64 | 54 68 72 65 61 64 3a 20 |WriteStd|Thread: | |00005970| 54 50 69 70 65 57 72 69 | 74 65 53 74 64 54 68 72 |TPipeWri|teStdThr| |00005980| 65 61 64 3b 0d 0a 20 20 | 50 69 70 65 52 65 61 64 |ead;.. |PipeRead| |00005990| 45 72 72 54 68 72 65 61 | 64 3a 20 54 50 69 70 65 |ErrThrea|d: TPipe| |000059a0| 52 65 61 64 45 72 72 54 | 68 72 65 61 64 3b 0d 0a |ReadErrT|hread;..| |000059b0| 20 20 73 3a 20 73 74 72 | 69 6e 67 3b 0d 0a 0d 0a | s: str|ing;....| |000059c0| 66 75 6e 63 74 69 6f 6e | 20 52 65 70 6f 72 74 47 |function| ReportG| |000059d0| 55 49 3a 20 73 74 72 69 | 6e 67 3b 0d 0a 76 61 72 |UI: stri|ng;..var| |000059e0| 0d 0a 20 20 64 2c 20 6e | 2c 20 65 3a 20 73 74 72 |.. d, n|, e: str| |000059f0| 69 6e 67 3b 0d 0a 62 65 | 67 69 6e 0d 0a 20 20 46 |ing;..be|gin.. F| |00005a00| 53 50 6c 69 74 28 41 45 | 78 65 63 75 74 61 62 6c |SPlit(AE|xecutabl| |00005a10| 65 2c 20 64 2c 20 6e 2c | 20 65 29 3b 0d 0a 20 20 |e, d, n,| e);.. | |00005a20| 52 65 73 75 6c 74 20 3a | 3d 20 6e 2b 65 2b 27 20 |Result :|= n+e+' | |00005a30| 69 73 20 61 20 47 55 49 | 20 61 70 70 6c 69 63 61 |is a GUI| applica| |00005a40| 74 69 6f 6e 27 3b 0d 0a | 65 6e 64 3b 0d 0a 0d 0a |tion';..|end;....| |00005a50| 62 65 67 69 6e 0d 0a 20 | 20 52 65 73 75 6c 74 20 |begin.. | Result | |00005a60| 3a 3d 20 6e 69 6c 3b 0d | 0a 0d 0a 20 20 77 69 74 |:= nil;.|... wit| |00005a70| 68 20 53 65 63 75 72 69 | 74 79 20 64 6f 0d 0a 20 |h Securi|ty do.. | |00005a80| 20 62 65 67 69 6e 0d 0a | 20 20 20 20 6e 4c 65 6e | begin..| nLen| |00005a90| 67 74 68 20 3a 3d 20 53 | 69 7a 65 4f 66 28 54 53 |gth := S|izeOf(TS| |00005aa0| 65 63 75 72 69 74 79 41 | 74 74 72 69 62 75 74 65 |ecurityA|ttribute| |00005ab0| 73 29 3b 0d 0a 20 20 20 | 20 6c 70 53 65 63 75 72 |s);.. | lpSecur| |00005ac0| 69 74 79 44 65 73 63 72 | 69 70 74 6f 72 20 3a 3d |ityDescr|iptor :=| |00005ad0| 20 6e 69 6c 3b 0d 0a 20 | 20 20 20 62 49 6e 68 65 | nil;.. | bInhe| |00005ae0| 72 69 74 48 61 6e 64 6c | 65 20 3a 3d 20 54 72 75 |ritHandl|e := Tru| |00005af0| 65 3b 0d 0a 20 20 65 6e | 64 3b 0d 0a 0d 0a 20 20 |e;.. en|d;.... | |00005b00| 43 72 65 61 74 65 50 69 | 70 65 28 73 69 5f 72 2c |CreatePi|pe(si_r,| |00005b10| 20 73 69 5f 77 2c 20 40 | 53 65 63 75 72 69 74 79 | si_w, @|Security| |00005b20| 2c 20 30 29 3b 0d 0a 20 | 20 43 72 65 61 74 65 50 |, 0);.. | CreateP| |00005b30| 69 70 65 28 73 6f 5f 72 | 2c 20 73 6f 5f 77 2c 20 |ipe(so_r|, so_w, | |00005b40| 40 53 65 63 75 72 69 74 | 79 2c 20 30 29 3b 0d 0a |@Securit|y, 0);..| |00005b50| 20 20 43 72 65 61 74 65 | 50 69 70 65 28 73 65 5f | Create|Pipe(se_| |00005b60| 72 2c 20 73 65 5f 77 2c | 20 40 53 65 63 75 72 69 |r, se_w,| @Securi| |00005b70| 74 79 2c 20 30 29 3b 0d | 0a 0d 0a 20 20 46 69 6c |ty, 0);.|... Fil| |00005b80| 6c 43 68 61 72 28 53 49 | 2c 20 53 69 7a 65 4f 66 |lChar(SI|, SizeOf| |00005b90| 28 53 49 29 2c 20 30 29 | 3b 0d 0a 20 20 53 49 2e |(SI), 0)|;.. SI.| |00005ba0| 43 42 20 3a 3d 20 53 69 | 7a 65 4f 66 28 53 49 29 |CB := Si|zeOf(SI)| |00005bb0| 3b 0d 0a 20 20 53 49 2e | 64 77 46 6c 61 67 73 20 |;.. SI.|dwFlags | |00005bc0| 3a 3d 20 53 54 41 52 54 | 46 5f 55 53 45 53 54 44 |:= START|F_USESTD| |00005bd0| 48 41 4e 44 4c 45 53 20 | 6f 72 20 53 54 41 52 54 |HANDLES |or START| |00005be0| 46 5f 55 53 45 53 48 4f | 57 57 49 4e 44 4f 57 3b |F_USESHO|WWINDOW;| |00005bf0| 0d 0a 20 20 53 49 2e 68 | 53 74 64 49 6e 70 75 74 |.. SI.h|StdInput| |00005c00| 20 3a 3d 20 73 69 5f 72 | 3b 0d 0a 20 20 53 49 2e | := si_r|;.. SI.| |00005c10| 68 53 74 64 4f 75 74 70 | 75 74 20 3a 3d 20 73 6f |hStdOutp|ut := so| |00005c20| 5f 77 3b 0d 0a 20 20 53 | 49 2e 68 53 74 64 45 72 |_w;.. S|I.hStdEr| |00005c30| 72 6f 72 20 3a 3d 20 73 | 65 5f 77 3b 0d 0a 20 20 |ror := s|e_w;.. | |00005c40| 53 49 2e 77 53 68 6f 77 | 57 69 6e 64 6f 77 20 3a |SI.wShow|Window :| |00005c50| 3d 20 53 57 5f 48 49 44 | 45 3b 0d 0a 20 20 69 66 |= SW_HID|E;.. if| |00005c60| 20 41 45 78 65 63 75 74 | 61 62 6c 65 20 3d 20 41 | AExecut|able = A| |00005c70| 53 63 72 69 70 74 20 74 | 68 65 6e 20 73 20 3a 3d |Script t|hen s :=| |00005c80| 20 41 45 78 65 63 75 74 | 61 62 6c 65 20 65 6c 73 | AExecut|able els| |00005c90| 65 20 73 20 3a 3d 20 41 | 45 78 65 63 75 74 61 62 |e s := A|Executab| |00005ca0| 6c 65 20 2b 20 27 20 27 | 20 2b 20 41 53 63 72 69 |le + ' '| + AScri| |00005cb0| 70 74 3b 0d 0a 20 20 69 | 66 20 41 51 75 65 72 79 |pt;.. i|f AQuery| |00005cc0| 50 61 72 61 6d 20 3c 3e | 20 27 27 20 74 68 65 6e |Param <>| '' then| |00005cd0| 20 73 20 3a 3d 20 73 20 | 2b 20 27 20 27 20 2b 20 | s := s |+ ' ' + | |00005ce0| 41 51 75 65 72 79 50 61 | 72 61 6d 3b 0d 0a 20 20 |AQueryPa|ram;.. | |00005cf0| 73 20 3a 3d 20 44 65 6c | 53 70 61 63 65 73 28 73 |s := Del|Spaces(s| |00005d00| 29 3b 0d 0a 20 20 62 20 | 3a 3d 20 43 72 65 61 74 |);.. b |:= Creat| |00005d10| 65 50 72 6f 63 65 73 73 | 28 0d 0a 20 20 20 20 6e |eProcess|(.. n| |00005d20| 69 6c 2c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |il, | | |00005d30| 20 20 20 20 20 20 20 20 | 2f 2f 20 70 6f 69 6e 74 | |// point| |00005d40| 65 72 20 74 6f 20 6e 61 | 6d 65 20 6f 66 20 65 78 |er to na|me of ex| |00005d50| 65 63 75 74 61 62 6c 65 | 20 6d 6f 64 75 6c 65 0d |ecutable| module.| |00005d60| 0a 20 20 20 20 50 43 68 | 61 72 28 73 29 2c 20 20 |. PCh|ar(s), | |00005d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2f | | //| |00005d80| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 63 6f 6d 6d | pointer| to comm| |00005d90| 61 6e 64 20 6c 69 6e 65 | 20 73 74 72 69 6e 67 0d |and line| string.| |00005da0| 0a 20 20 20 20 40 53 65 | 63 75 72 69 74 79 2c 20 |. @Se|curity, | |00005db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2f | | //| |00005dc0| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 70 72 6f 63 | pointer| to proc| |00005dd0| 65 73 73 20 73 65 63 75 | 72 69 74 79 20 61 74 74 |ess secu|rity att| |00005de0| 72 69 62 75 74 65 73 0d | 0a 20 20 20 20 40 53 65 |ributes.|. @Se| |00005df0| 63 75 72 69 74 79 2c 20 | 20 20 20 20 20 20 20 20 |curity, | | |00005e00| 20 20 20 20 20 20 2f 2f | 20 70 6f 69 6e 74 65 72 | //| pointer| |00005e10| 20 74 6f 20 74 68 72 65 | 61 64 20 73 65 63 75 72 | to thre|ad secur| |00005e20| 69 74 79 20 61 74 74 72 | 69 62 75 74 65 73 0d 0a |ity attr|ibutes..| |00005e30| 20 20 20 20 54 72 75 65 | 2c 20 20 20 20 20 20 20 | True|, | |00005e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2f 20 | | // | |00005e50| 68 61 6e 64 6c 65 20 69 | 6e 68 65 72 69 74 61 6e |handle i|nheritan| |00005e60| 63 65 20 66 6c 61 67 0d | 0a 20 20 20 20 43 52 45 |ce flag.|. CRE| |00005e70| 41 54 45 5f 53 55 53 50 | 45 4e 44 45 44 2c 20 20 |ATE_SUSP|ENDED, | |00005e80| 20 20 20 20 20 20 2f 2f | 20 63 72 65 61 74 69 6f | //| creatio| |00005e90| 6e 20 66 6c 61 67 73 0d | 0a 20 20 20 20 50 43 68 |n flags.|. PCh| |00005ea0| 61 72 28 41 45 6e 76 53 | 74 72 29 2c 20 20 20 20 |ar(AEnvS|tr), | |00005eb0| 20 20 20 20 20 20 2f 2f | 20 70 6f 69 6e 74 65 72 | //| pointer| |00005ec0| 20 74 6f 20 6e 65 77 20 | 65 6e 76 69 72 6f 6e 6d | to new |environm| |00005ed0| 65 6e 74 20 62 6c 6f 63 | 6b 0d 0a 20 20 20 20 50 |ent bloc|k.. P| |00005ee0| 43 68 61 72 28 41 50 61 | 74 68 29 2c 20 20 20 20 |Char(APa|th), | |00005ef0| 20 20 20 20 20 20 20 20 | 2f 2f 20 70 6f 69 6e 74 | |// point| |00005f00| 65 72 20 74 6f 20 63 75 | 72 72 65 6e 74 20 64 69 |er to cu|rrent di| |00005f10| 72 65 63 74 6f 72 79 20 | 6e 61 6d 65 0d 0a 20 20 |rectory |name.. | |00005f20| 20 20 53 49 2c 20 20 20 | 20 20 20 20 20 20 20 20 | SI, | | |00005f30| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 70 6f | | // po| |00005f40| 69 6e 74 65 72 20 74 6f | 20 53 54 41 52 54 55 50 |inter to| STARTUP| |00005f50| 49 4e 46 4f 0d 0a 20 20 | 20 20 50 49 20 20 20 20 |INFO.. | PI | |00005f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005f70| 20 20 20 2f 2f 20 70 6f | 69 6e 74 65 72 20 74 6f | // po|inter to| |00005f80| 20 50 52 4f 43 45 53 53 | 5f 49 4e 46 4f 52 4d 41 | PROCESS|_INFORMA| |00005f90| 54 49 4f 4e 0d 0a 20 20 | 29 3b 0d 0a 0d 0a 20 20 |TION.. |);.... | |00005fa0| 69 66 20 62 20 74 68 65 | 6e 0d 0a 20 20 62 65 67 |if b the|n.. beg| |00005fb0| 69 6e 0d 0a 20 20 20 20 | 7b 2d 2d 24 49 46 44 45 |in.. |{--$IFDE| |00005fc0| 46 20 43 48 45 43 4b 5f | 47 55 49 7d 0d 0a 20 20 |F CHECK_|GUI}.. | |00005fd0| 20 20 69 66 20 57 61 69 | 74 46 6f 72 49 6e 70 75 | if Wai|tForInpu| |00005fe0| 74 49 64 6c 65 28 50 49 | 2e 68 50 72 6f 63 65 73 |tIdle(PI|.hProces| |00005ff0| 73 2c 20 30 29 20 3d 20 | 57 41 49 54 5f 54 49 4d |s, 0) = |WAIT_TIM| |00006000| 45 4f 55 54 20 74 68 65 | 6e 0d 0a 20 20 20 20 62 |EOUT the|n.. b| |00006010| 65 67 69 6e 0d 0a 20 20 | 20 20 20 20 45 72 72 6f |egin.. | Erro| |00006020| 72 4d 73 67 20 3a 3d 20 | 52 65 70 6f 72 74 47 55 |rMsg := |ReportGU| |00006030| 49 3b 0d 0a 20 20 20 20 | 20 20 54 65 72 6d 69 6e |I;.. | Termin| |00006040| 61 74 65 50 72 6f 63 65 | 73 73 28 50 49 2e 68 50 |ateProce|ss(PI.hP| |00006050| 72 6f 63 65 73 73 2c 20 | 30 29 3b 0d 0a 20 20 20 |rocess, |0);.. | |00006060| 20 20 20 43 6c 6f 73 65 | 48 61 6e 64 6c 65 28 50 | Close|Handle(P| |00006070| 49 2e 68 54 68 72 65 61 | 64 29 3b 0d 0a 20 20 20 |I.hThrea|d);.. | |00006080| 20 20 20 43 6c 6f 73 65 | 48 61 6e 64 6c 65 28 50 | Close|Handle(P| |00006090| 49 2e 68 50 72 6f 63 65 | 73 73 29 3b 0d 0a 20 20 |I.hProce|ss);.. | |000060a0| 20 20 20 20 62 20 3a 3d | 20 46 61 6c 73 65 3b 0d | b :=| False;.| |000060b0| 0a 20 20 20 20 65 6e 64 | 3b 0d 0a 20 20 20 20 7b |. end|;.. {| |000060c0| 2d 2d 24 45 4e 44 49 46 | 7d 0d 0a 20 20 65 6e 64 |--$ENDIF|}.. end| |000060d0| 20 65 6c 73 65 0d 0a 20 | 20 62 65 67 69 6e 0d 0a | else.. | begin..| |000060e0| 20 20 20 20 45 72 72 6f | 72 4d 73 67 20 3a 3d 20 | Erro|rMsg := | |000060f0| 53 79 73 45 72 72 6f 72 | 4d 73 67 28 47 65 74 4c |SysError|Msg(GetL| |00006100| 61 73 74 45 72 72 6f 72 | 29 3b 0d 0a 20 20 65 6e |astError|);.. en| |00006110| 64 3b 0d 0a 0d 0a 20 20 | 69 66 20 6e 6f 74 20 62 |d;.... |if not b| |00006120| 20 74 68 65 6e 0d 0a 20 | 20 62 65 67 69 6e 0d 0a | then.. | begin..| |00006130| 20 20 20 20 43 6c 6f 73 | 65 48 61 6e 64 6c 65 73 | Clos|eHandles| |00006140| 28 5b 73 69 5f 72 2c 20 | 73 69 5f 77 2c 20 73 6f |([si_r, |si_w, so| |00006150| 5f 72 2c 20 73 6f 5f 77 | 2c 20 73 65 5f 72 2c 20 |_r, so_w|, se_r, | |00006160| 73 65 5f 77 5d 29 3b 0d | 0a 20 20 20 20 45 78 69 |se_w]);.|. Exi| |00006170| 74 3b 0d 0a 20 20 65 6e | 64 3b 0d 0a 0d 0a 20 20 |t;.. en|d;.... | |00006180| 69 66 20 41 53 74 64 49 | 6e 53 74 72 20 3d 20 27 |if AStdI|nStr = '| |00006190| 27 20 74 68 65 6e 0d 0a | 20 20 62 65 67 69 6e 0d |' then..| begin.| |000061a0| 0a 20 20 20 20 50 69 70 | 65 57 72 69 74 65 53 74 |. Pip|eWriteSt| |000061b0| 64 54 68 72 65 61 64 20 | 3a 3d 20 6e 69 6c 3b 0d |dThread |:= nil;.| |000061c0| 0a 20 20 65 6e 64 20 65 | 6c 73 65 0d 0a 20 20 62 |. end e|lse.. b| |000061d0| 65 67 69 6e 0d 0a 20 20 | 20 20 50 69 70 65 57 72 |egin.. | PipeWr| |000061e0| 69 74 65 53 74 64 54 68 | 72 65 61 64 20 3a 3d 20 |iteStdTh|read := | |000061f0| 54 50 69 70 65 57 72 69 | 74 65 53 74 64 54 68 72 |TPipeWri|teStdThr| |00006200| 65 61 64 2e 43 72 65 61 | 74 65 28 54 72 75 65 29 |ead.Crea|te(True)| |00006210| 3b 0d 0a 20 20 20 20 50 | 69 70 65 57 72 69 74 65 |;.. P|ipeWrite| |00006220| 53 74 64 54 68 72 65 61 | 64 2e 73 20 3a 3d 20 41 |StdThrea|d.s := A| |00006230| 53 74 64 49 6e 53 74 72 | 3b 0d 0a 20 20 20 20 50 |StdInStr|;.. P| |00006240| 69 70 65 57 72 69 74 65 | 53 74 64 54 68 72 65 61 |ipeWrite|StdThrea| |00006250| 64 2e 48 50 69 70 65 20 | 3a 3d 20 73 69 5f 77 3b |d.HPipe |:= si_w;| |00006260| 0d 0a 20 20 20 20 50 69 | 70 65 57 72 69 74 65 53 |.. Pi|peWriteS| |00006270| 74 64 54 68 72 65 61 64 | 2e 53 75 73 70 65 6e 64 |tdThread|.Suspend| |00006280| 65 64 20 3a 3d 20 46 61 | 6c 73 65 3b 0d 0a 20 20 |ed := Fa|lse;.. | |00006290| 65 6e 64 3b 0d 0a 0d 0a | 20 20 50 69 70 65 52 65 |end;....| PipeRe| |000062a0| 61 64 45 72 72 54 68 72 | 65 61 64 20 3a 3d 20 54 |adErrThr|ead := T| |000062b0| 50 69 70 65 52 65 61 64 | 45 72 72 54 68 72 65 61 |PipeRead|ErrThrea| |000062c0| 64 2e 43 72 65 61 74 65 | 28 54 72 75 65 29 3b 0d |d.Create|(True);.| |000062d0| 0a 20 20 50 69 70 65 52 | 65 61 64 45 72 72 54 68 |. PipeR|eadErrTh| |000062e0| 72 65 61 64 2e 48 50 69 | 70 65 20 3a 3d 20 73 65 |read.HPi|pe := se| |000062f0| 5f 72 3b 0d 0a 20 20 50 | 69 70 65 52 65 61 64 45 |_r;.. P|ipeReadE| |00006300| 72 72 54 68 72 65 61 64 | 2e 53 75 73 70 65 6e 64 |rrThread|.Suspend| |00006310| 65 64 20 3a 3d 20 46 61 | 6c 73 65 3b 0d 0a 0d 0a |ed := Fa|lse;....| |00006320| 20 20 43 6f 6c 6c 65 63 | 74 6f 72 20 3a 3d 20 54 | Collec|tor := T| |00006330| 43 6f 6c 6c 65 63 74 6f | 72 2e 43 72 65 61 74 65 |Collecto|r.Create| |00006340| 3b 0d 0a 20 20 45 6e 74 | 69 74 79 48 65 61 64 65 |;.. Ent|ityHeade| |00006350| 72 20 3a 3d 20 54 45 6e | 74 69 74 79 48 65 61 64 |r := TEn|tityHead| |00006360| 65 72 2e 43 72 65 61 74 | 65 3b 0d 0a 20 20 50 69 |er.Creat|e;.. Pi| |00006370| 70 65 52 65 61 64 53 74 | 64 54 68 72 65 61 64 20 |peReadSt|dThread | |00006380| 3a 3d 20 54 50 69 70 65 | 52 65 61 64 53 74 64 54 |:= TPipe|ReadStdT| |00006390| 68 72 65 61 64 2e 43 72 | 65 61 74 65 28 54 72 75 |hread.Cr|eate(Tru| |000063a0| 65 29 3b 0d 0a 20 20 50 | 69 70 65 52 65 61 64 53 |e);.. P|ipeReadS| |000063b0| 74 64 54 68 72 65 61 64 | 2e 50 72 69 6f 72 69 74 |tdThread|.Priorit| |000063c0| 79 20 3a 3d 20 74 70 4c | 6f 77 65 72 3b 0d 0a 20 |y := tpL|ower;.. | |000063d0| 20 50 69 70 65 52 65 61 | 64 53 74 64 54 68 72 65 | PipeRea|dStdThre| |000063e0| 61 64 2e 43 6f 6c 6c 65 | 63 74 6f 72 20 3a 3d 20 |ad.Colle|ctor := | |000063f0| 43 6f 6c 6c 65 63 74 6f | 72 3b 0d 0a 20 20 50 69 |Collecto|r;.. Pi| +--------+-------------------------+-------------------------+--------+--------+ Only 25.0 KB of data is shown above.